On August 14, 2003 03:33 pm, Robert Cummings wrote:
> Actually isset() doesn't behave as it should:
>
>     $foo = null;
>     echo isset( $foo );

Not quite. To understand the nature of NULL you must consider the following. 
Suppose you have a variable $foo you wish to 'destroy' you can do so by doing 
unset($foo) or $foo = NULL;. In both cases the value of $foo will be 
destroyed, however the variable will remain, it's value will become NULL. 
Therefor isset() behaviour, which works by seeing if a variable exists and 
making sure that its value is not null, is correct and now flawed as you 
claim. This is true for other languages as well such as C, when a pointer's 
value is null that pointer is 'no set'.

Ilia


-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to