Why is it that I can't reference a global variable directly in PHP?
Posted
by DKinzer
on Stack Overflow
See other posts from Stack Overflow
or by DKinzer
Published on 2010-04-08T19:01:13Z
Indexed on
2010/04/08
19:03 UTC
Read the original article
Hit count: 125
php
I'm curious to know why the following code behaves differently?
The following does not work:
$_variable &= global $_global;
echo $_variable;
The following works:
global $global;
$_variable &= $_global;
echo $_variable;
?
© Stack Overflow or respective owner