[PHP-DEV] PHP 4.0 Bug #2193 Updated: Global declared variables not gobal From: Bug Database (php-dev <email protected>)
Date: 08/30/99

ID: 2193
Updated by: zeev
Reported By: lemming <email protected>
Status: Closed
Bug Type: Scripting Engine problem
Assigned To:
Comments:

Your code is wrong.
When you include a file from within a function, the included
code is executed in the scope of that function. Thus, when you
include t1.php from Test2(), $T=1 is executed in the scope of
Test2(), and does not become a global variable. For that reason,
global $T inside Test() does not attach to this variable.

Full Bug description available at: http://bugs.php.net/version4/?id=2193

-- 
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>