Class problem (was RE: [PHP4BETA] Two questions:)

From: Date: Thu, 13 Apr 2000 20:07:54 +0000
Subject: Class problem (was RE: [PHP4BETA] Two questions:)
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-13522@lists.php.net to get a copy of this message
On 13-Apr-00 Colin Viebrock wrote: > 1) Can I not use set_file_buffer() when opening a pointer to STDOUT? > If not, how can disable write buffering? > > 2) What exactly are the differences with classes between PHP3 and PHP4? > We are porting several scripts over, and they fail for various reasons. > Further to what he said I'm running into something in my whois2.php class, Normally: <? require("whois.main"); $whois = new Whois("foo.com"); $result = $whois->Lookup(); ...at this point the class can do a number of things, including invoking further extended classes based on things like a) which TLD, and b) which registrar when all is said and done, on php3 I end up with the raw whois output from the regsitrar whois server in $result["rawdata"]; on php4, the same raw whois output ends up in $result["rawdata"]["rawdata"]; This was a problem I ran into in the original development of the class and I had to be careful what I was setting based on whether it was a new instance of the the class or a second time through, if(isSet($this->result["rawdata"])) { $result = $output; } else { $result["rawdata"] = $output; } was a kludge I used which seemed to help on php3. No dice on php4, is there some sort of general scoping issue to be aware of with classes? -mark --- |||| mark jeftovic (MJ177) ==== http://stuntpope.cyberpunk.cc/ |||| |||| easyDNS Technologies Inc. ==== http://www.easyDNS.com/ |||| ------------------------------------------------------------------------------ dns hosting / domain registrations / web forwarding / mail forwarding / etc ------------------------------------------------------------------------------

« previous php.version4 (#13522) next »