note 25331 added to language.variables.scope

From: Date: Thu, 19 Sep 2002 22:44:41 +0000
Subject: note 25331 added to language.variables.scope
Groups: php.notes 
Request: Send a blank email to php-notes+get-37001@lists.php.net to get a copy of this message
I have discovered that only "absolute globality" possible in PHP. For example: <? function a() { function b() { global $c; print $c; } $c = 'a'; b(); } a(); ?> outputs nothing, while <? function a() { global $c; function b() { global $c; print $c; } $c = 'a'; b(); } a(); ?> does that trick. -- http://www.php.net/manual/en/language.variables.scope.php http://master.php.net/manage/user-notes.php?action=edit+25331 http://master.php.net/manage/user-notes.php?action=delete+25331 http://master.php.net/manage/user-notes.php?action=reject+25331

« previous php.notes (#37001) next »