note 28767 deleted from language.references by sniper
| From: | sniper@php.net | Date: | Tue, 30 Sep 2003 01:18:39 +0000 |
| Subject: | note 28767 deleted from language.references by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-57314@lists.php.net to get a copy of this message | ||
Note Submitter: marc at schiffbauer dot net
----
If you want to reset a variable which is a reference, you can do that with the unset() function.
$a = "foo";
$b = &$a;
$b references to $a now:
echo $b // => "foo"
$b = NULL; // => now $a is NULL, too
but:
unset($b);
$b = NULL; // => $a is still "foo" and $b is NULL