note 69770 added to reserved.variables

From: Date: Wed, 20 Sep 2006 09:46:00 +0000
Subject: note 69770 added to reserved.variables
Groups: php.notes 
Request: Send a blank email to php-notes+get-117342@lists.php.net to get a copy of this message
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. ---- Server IP: 64.71.164.2 Probable Submitter: 67.165.83.23 ---- Manual Page -- http://www.php.net/manual/en/reserved.variables.php Edit -- https://master.php.net/note/edit/69770 Del: integrated -- https://master.php.net/note/delete/69770/integrated Del: useless -- https://master.php.net/note/delete/69770/useless Del: bad code -- https://master.php.net/note/delete/69770/bad+code Del: spam -- https://master.php.net/note/delete/69770/spam Del: non-english -- https://master.php.net/note/delete/69770/non-english Del: in docs -- https://master.php.net/note/delete/69770/in+docs Del: other reasons-- https://master.php.net/note/delete/69770 Reject -- https://master.php.net/note/reject/69770 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#117342) next »