From: myle34 at hotmail dot com
Operating system: Windows XP Home
PHP version: 5.0.0b2 (beta2)
PHP Bug Type: Variables related
Bug description: Global vs function scope problem?
Description:
------------
I'm not sure if this is a bug, but I haven't found anything so far stating
that it isn't so...
I am using Windows XP Home and Apache 2.0.47 with PHP beta 2.
Reproduce code:
---------------
// Uncommenting the following makes it work...
// global $foo;
$foo = 'bar';
// Uncommenting the following doesn't help...
// global $foo;
function Test()
{
global $foo;
echo $foo;
}
Expected result:
----------------
bar
Actual result:
--------------
No output
--
Edit bug report at http://bugs.php.net/?id=26173&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26173&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26173&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=26173&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=26173&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=26173&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=26173&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=26173&r=support
Expected behavior: http://bugs.php.net/fix.php?id=26173&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=26173&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=26173&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=26173&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26173&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=26173&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=26173&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=26173&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26173&r=float