Re: [PHP4BETA] PHP4-Zend bug or undocumented incompatibility?

From: Date: Thu, 09 Mar 2000 02:07:05 +0000
Subject: Re: [PHP4BETA] PHP4-Zend bug or undocumented incompatibility?
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-11782@lists.php.net to get a copy of this message
This is a documented incompatibility: http://www.php.net/version4/incompatibilities.php "unset() is no longer a function, but a statement. It was never documented as a function, so the impact here will probably be non existent." && From http://www.php.net/manual/function.unset.php3 "PHP4 incompatibility: When used on static variables in funnctions, they lose their static property. (So, dont use them on static variables.) This behaviour is different then PHP3 behaviour, and it is one of the incompatibilities. According to Zeev, PHP4 displays correct behaviour and PHP3 behaviour of unset() can be called "not very well defined." See bug 2015 for an example." Hope this helps... Gavin Manuel Lemos wrote: > > 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 > -- > > -- > PHP 4.0 Beta Mailing List <http://www.php.net/version4/> > To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net > For additional commands, e-mail: php4beta-help@lists.php.net > To contact the list administrators, e-mail: php4beta-admin@lists.php.net -- Gavin M. Roy, Director of Technology, C.O.O. Ready Set Net (formerly PathFinders) ---------------------------------------------------------------- The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.

« previous php.version4 (#11782) next »