RE: [PHP4BETA] Another 'incompatibility' with php3.

From: Date: Mon, 09 Aug 1999 23:31:32 +0000
Subject: RE: [PHP4BETA] Another 'incompatibility' with php3.
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-3263@lists.php.net to get a copy of this message
Ignore the class foo, forgot to nuke that from an earlier test. > -----Original Message----- > From: Sander Pilon [mailto:sander@3dnews.net] > Sent: Tuesday, August 10, 1999 01:29 > To: PHP4 > Subject: [PHP4BETA] Another 'incompatibility' with php3. > > > <script language="php"> > class foo > { > var $test; > }; > > function test() > { > static $test1; > echo "BEFORE: $test1 <BR>"; > > unset($test1); > > $test1 = "Hello"; > echo "AFTER: $test1 <BR>"; > } > > test(); > echo "-- <BR>"; > test(); > </script> > > PHP4B2 outputs: (static variable is lost) > > BEFORE: > AFTER: Hello > -- > BEFORE: > AFTER: Hello > > > PHP3 outputs: (expected behaviour) > > BEFORE: > AFTER: Hello > -- > BEFORE: Hello > AFTER: Hello > > > > Sander Pilon - President, 3DN.NET, Inc. > http://www.3dnews.net > http://www.3dn.net > mail: sander@3dnews.net > > -- > PHP 4 Beta >

« previous php.version4 (#3263) next »