|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-03-20 06:40 UTC] hholzgra@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 05:00:01 2025 UTC |
consider the following code snippet: <? function foo() { global $bar; $bar="hello"; } foo(); echo $bar; ?> in PHP 3 calling foo() will create a global variable $bar if it doesn't exist in PHP 4 there will be no $bar after calling foo i think PHP 4 should behave like PHP 3 here not only due to compatibility reasons but also due to the "least supprise" rule