note 2127 modified in Variables by ronabop
| From: | ronabop@php.net | Date: | Sat, 12 Aug 2000 21:54:29 +0000 |
| Subject: | note 2127 modified in Variables by ronabop | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-1600@lists.php.net to get a copy of this message | ||
Oh ya I noticed a bug in 3.11.. A unset variable is not a deallocation of the variable but a value
like null is a value.. Do this create a associative array, set a variable equal to the associative
array but give the array a undefined key, the variable that is given this value is also unset..
This is a cool trick but too deep for some users..
Try this:
$thisstuff["yah"] = "yabba";
$stuff = $thisstuff[""];
if (isset($stuff)) {
print "yay";
} else {
print "nay";
}
http://www.php.net/manual/variables.php