note 59104 added to language.references.unset
| From: | clerca at inp-net dot eu dot org | Date: | Sat, 26 Nov 2005 08:33:51 +0000 |
| Subject: | note 59104 added to language.references.unset | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-99129@lists.php.net to get a copy of this message | ||
If you have a lot of references linked to the same contents, maybe it could be useful to do this :
<?php
$a = 1;
$b = & $a;
$c = & $b; // $a, $b, $c reference the same content '1'
$b = NULL; // All variables $a, $b or $c are unset
?>
I haven't test this trick a lot, but well, it seems to work greatly.
----
Manual Page -- http://www.php.net/manual/en/language.references.unset.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+59104
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+59104&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+59104&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+59104&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+59104&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+59104&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+59104&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+59104&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+59104&report=yes
Search -- http://master.php.net/manage/user-notes.php