note 63065 added to language.references.unset
| From: | rustin dot phares at hotmail dot com | Date: | Mon, 13 Mar 2006 06:31:35 +0000 |
| Subject: | note 63065 added to language.references.unset | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-105636@lists.php.net to get a copy of this message | ||
If you wish to unset both variables, you will need to unset the last referenced variable of that
condition.
<?php
$a = 1;
$b =& $a;
unset($b);
?>
* These must be in a reference->copy hierarchy in order to unset; example:
<?php
$a = 1;
$b =& $a;
$c =& $b;
unset($c);
?>
This will not work:
<?php
$a = 1;
$b =& $a;
$c = $b;
unset($c);
?>
* Only $c is unset in the above example, meaning that both variables $b and $a are still assigned
"1".
----
Server IP: 64.71.164.2
Probable Submitter: 12.217.127.53
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/language.references.unset.php
Edit -- http://master.php.net/note/edit/63065
Del: integrated -- http://master.php.net/note/delete/63065/integrated
Del: useless -- http://master.php.net/note/delete/63065/useless
Del: bad code -- http://master.php.net/note/delete/63065/bad+code
Del: spam -- http://master.php.net/note/delete/63065/spam
Del: non-english -- http://master.php.net/note/delete/63065/non-english
Del: in docs -- http://master.php.net/note/delete/63065/in+docs
Del: other reasons-- http://master.php.net/note/delete/63065
Reject -- http://master.php.net/note/reject/63065
Search -- http://master.php.net/manage/user-notes.php