note 95106 rejected from function.get-defined-vars by thiago

From: Date: Mon, 14 Dec 2009 11:47:01 +0000
Subject: note 95106 rejected from function.get-defined-vars by thiago
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-163921@lists.php.net to get a copy of this message
Note Submitter: randallgirard at hotmail dot com ---- The documentation states that $GLOBALS is included in the list. However, it does not appear to do so under PHP 5.3.0. Perhaps this was updated in the new version and the documentation was not? <?php function foobar( $foo=NULL, $bar=NULL ) { var_dump(array_keys(get_defined_vars())); } foobar(); ?> I get the following output: array(2) { [0]=> string(3) "foo" [1]=> string(3) "bar" }

« previous php.notes (#163921) next »