note 69770 deleted from reserved.variables by felipe

From: Date: Sun, 30 Dec 2007 18:26:28 +0000
Subject: note 69770 deleted from reserved.variables by felipe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-134358@lists.php.net to get a copy of this message
Note Submitter: seanhickey at gmail dot com ---- Note that class objects will not be in the $GLOBALS array until *after* the classe's constructor returns. <?php class A { public function __construct() { var_dump($GLOBALS); } } $a = new A; var_dump($GLOBALS); ?> The first var_dump() inside the __construct() method will not contain the value of $a, while the second one will.

« previous php.notes (#134358) next »