Re: Global unavailable?

From: Date: Sat, 08 Oct 2005 03:48:54 +0000
Subject: Re: Global unavailable?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-223759@lists.php.net to get a copy of this message
Problem not reproducable. Test case used: ------------------------------- a.inc.php: <?php $a = 123; ------------------------------- b.inc.php: <?php require 'a.inc.php'; class b { function test() { global $a; echo $a; } } ------------------------------- t.php: <?php require 'b.inc.php'; $x=new b(); $x->test(); ------------------------------- Command line: php t.php Output: 123 I used PHP-5.1 RC1. No problem whatsoever. Such problems shouldn't arise in new versions since they are touching very basic concepts that didn't change. AllOLLi ____________ "You see, Mr. President: The worlds hates America. And for good reason. (I wont bother going into details)" [24 319]

« previous php.general (#223759) next »