note 46058 added to language.oop.magic-functions
| From: | j dot gizmo at aon dot at | Date: | Tue, 28 Sep 2004 12:48:33 +0000 |
| Subject: | note 46058 added to language.oop.magic-functions | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-77513@lists.php.net to get a copy of this message | ||
re: last post
are you sure the problem with global variables doesn't arise from the use of references?
<?
class test
{
function __wakeup ()
{
global $link;
//will not work
$link =& $this;
//will work
$GLOBALS['link'] =& $this;
}
}
?>
see the section on references for further details
----
Manual Page -- http://www.php.net/manual/en/language.oop.magic-functions.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+46058
Delete -- http://master.php.net/manage/user-notes.php?action=delete+46058&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+46058&report=yes
Search -- http://master.php.net/manage/user-notes.php