From:             [EMAIL PROTECTED]
Operating system: debian linux
PHP version:      4.0.4pl1
PHP Bug Type:     Variables related
Bug description:  global variables cannot be accessed from an objects function?

class a {
        function a() {
                if(!isset($GLOBALS["b"])) {
                        echo "loading b";
                        $GLOBALS["b"] = new b();
class b {
        function b() {
                if(!isset($GLOBALS["a"])) {
                        echo "loading a";
                        $GLOBALS["a"] = new a();
# creates an infinite loop
new a();

Edit Bug report at:

PHP Development Mailing List <>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to