Mantis - Quercus
Viewing Issue Advanced Details
4072 minor always 06-08-10 09:14 06-08-10 09:14
sblommers Linux  
Ubuntu  
normal 10.04  
new 4.0.8  
open  
none    
none  
0004072: unset value does not seem to work correctly
After unsetting array_key_exists still returns true but should be false.
<?php
unset($c); //force $c to be unset
$a=&$c; // NULL, but this actually sets $a and $c to the 'same' NULL.
$a = 5;
unset($c);
$a=&$c;
unset($c);
$a = 5;
?>

In the following example, we see an alternate method of testing if a variable is actually set or not:
<?php
var_dump(array_key_exists('c',get_defined_vars())); // SHOULD BE false
unset($c); // actually unset it
var_dump(array_key_exists('c',get_defined_vars())); // SHOULD BE false
?>

There are no notes attached to this issue.