PHP4-Zend bug or undocumented incompatibility?

From: Date: Thu, 09 Mar 2000 00:08:08 +0000
Subject: PHP4-Zend bug or undocumented incompatibility?
Groups: php.version4 
Request: Send a blank email to php-version4+get-11778@lists.php.net to get a copy of this message
Hello, I have been postponing moving to PHP 4 because early when the first betas were released I had a large and important application of mine breaking while it run ok with PHP 3. Now I made some time to take a deeep look on why it is break and I found two problems in PHP4 that are related with references. One I could not figure what was the problem although it seems I was able to fix the sympthom (hopefully without breaking my application). Another problem I was able to isolate and replicate in few lines. It turns out that if you pass a variable by reference and Unset it in a function, under PHP 4 it is not Unset in the calling environment as it used to be in PHP 3. Try the script about under PHP 3 and PHP 4 to see what is wrong. What I need to know right now if is this a bug in PHP 4 or and undocumented incompatibility, so I can decide to wait for a fix or add some work around in my application. BTW, while I am at it. Is this the most appropriate list for Zend questions like those about the just released Zend optimizer or is there any other more suitable? <? Function Clear(&$variable) { UnSet($variable); } $variable=1; Clear($variable); echo IsSet($variable),"\n"; ?> Regards, Manuel Lemos Web Programming Components using PHP Classes. Look at: http://phpclasses.UpperDesign.com/?user=mlemos@acm.org -- E-mail: mlemos@acm.org URL: http://www.mlemos.e-na.net/ PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp --

« previous php.version4 (#11778) next »