Date: 06/30/01
- Next message: unix-guy <email protected>: "[PHP-DEV] Bug #11761 Updated: LC_CTYPE undeclared"
- Previous message: Sascha Schumann: "[PHP-DEV] [ADMIN] New Mailing List Server"
- In reply to: John Parker: "[PHP-DEV] 'Global' variable scope."
- Next in thread: Zeev Suraski: "Re: [PHP-DEV] 'Global' variable scope."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
because it's not global. global variables are those not defined
within any function, method, or object. and please, ask further
questions like this in php-general@
At 13:01 6/29/2001, John Parker wrote the following:
--------------------------------------------------------------
>Hi, all.
>
>I'm just wondering why a variable defined within a function is not available
>as a global to functions called from the same scope. There's probably a
>really good reason for this, but I'm not sure I know what it is.
>
>Feel free to educate me.
>
>Ta muchly,
>JP.
>
>--- Code example follows ---
>
><?PHP // Simple global variable scope test. Function startTests() { $G_test = "Hello, World."; globalTest(); } Function globalTest() { global $G_test; if (isset($G_test)) { echo ("Global variable 'test' - value:
>'<B>".$G_test."</B>'.<P>\n"); } else echo ("Global variable 'test' is not set.<P>\n"); }?>
>
>------------------------------------------------------------------
>John Parker email: jparker <email protected>
>Internet Project Manager/Software Engineer web:www.itchannel.net
>itCHANNEL International Ltd. tel: +44 (0) 1202 291939
>
>
>--
>PHP Development Mailing List <http://www.php.net/>
>To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
>For additional commands, e-mail: php-dev-help <email protected>
>To contact the list administrators, e-mail: php-list-admin <email protected>
------end of quote------
cynic <email protected>
-------------
And the eyes of them both were opened and they saw that their files
were world readable and writable, so they chmoded 600 their files.
- Book of Installation chapt 3 sec 7
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: unix-guy <email protected>: "[PHP-DEV] Bug #11761 Updated: LC_CTYPE undeclared"
- Previous message: Sascha Schumann: "[PHP-DEV] [ADMIN] New Mailing List Server"
- In reply to: John Parker: "[PHP-DEV] 'Global' variable scope."
- Next in thread: Zeev Suraski: "Re: [PHP-DEV] 'Global' variable scope."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

