RE: [PHP4BETA] A quick clarification question about PHP4...

From: Date: Wed, 01 Sep 1999 12:10:40 +0000
Subject: RE: [PHP4BETA] A quick clarification question about PHP4...
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-3961@lists.php.net to get a copy of this message
> -----Original Message----- > From: Joey [mailto:joey@samaritan.com] > Sent: Wednesday, September 01, 1999 12:25 PM > To: Sander Pilon > Cc: Samuel Liddicott; Scott Stevenson; php4beta@lists.php.net > Subject: RE: [PHP4BETA] A quick clarification question about PHP4... > > "A true unset() implementation. A variable or element that is unset(), is > now sent to oblivion in its entirely, no trace remains from it." This isn't even true. The next time the static function is called its old value as was before unset was called is still stored there. <?php function my_unset(&$x) { $x=$unset; } function x($x1) { static $x=2; echo isset($x)." x $x<br>\n"; $x++; unset($x); echo isset($x)." x $x<br>\n"; $x=5; } x(); x(); ?> will output: 1 x 2 x 1 x 3 x and not 1 x 2 x 1 x 5 x with the old unset behaviour, or 1 x 2 x 1 x x as the zend page http://www.zend.com/ describes Sam

« previous php.version4 (#3961) next »