RE: [PHP4BETA] lates libzend update did bad things

From: Date: Fri, 03 Sep 1999 14:07:56 +0000
Subject: RE: [PHP4BETA] lates libzend update did bad things
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-4037@lists.php.net to get a copy of this message
At 16:03 03/09/99 , Samuel Liddicott wrote:
-----Original Message----- From: Zeev Suraski [mailto:zeev@zend.com] Sent: Friday, September 03, 1999 02:51 PM To: Samuel Liddicott; Thies C. Arntzen; php4beta@lists.php.net Subject: RE: [PHP4BETA] lates libzend update did bad things Thanks for replying; - I know I annoy you sometimes. There's no support for 'assigning' an undefined value in PHP. There was partial support for it in 3.0 (and the framework for that partial support remains in 4.0), but it was very bad. It meant each and every piece of code in PHP, including any builtin function, had to check for that undefined value, which is not acceptable. Is this different to checking whether or not a variable is assigned? I mean; internally are these processed different? $var=2; unset($var); print ($var*2); and $var=2; $var=$undefined_var; print ($var*2);
Yes. unset($var) leaves no trace of $var. Assigning $var with anything, regardless of what you're assigning it with, $undefined_var included, means $var is intact, and contains some sort of a value. It would contain that so called undefined value, but it would mean that each and every piece of code that may handle $var must be aware that in case it contains that undefined value, it must behave differently. Zeev -- Zeev Suraski <zeev@zend.com> http://www.zend.com/ For a PGP public key, finger bourbon@netvision.net.il

« previous php.version4 (#4037) next »