Again scope

From: Date: Fri, 31 Jan 2003 20:03:02 +0000
Subject: Again scope
Groups: php.dev 
Request: Send a blank email to php-dev+get-93876@lists.php.net to get a copy of this message
<? Class Foo { var $foo2; Function Bar() { echo $foo2."\n"; print "Bar"; } Function Bar2() { $foo2="foo2"; Bar(); } } $f = new foo; $f->Bar2(); ?> give me this error: Fatal error: Call to undefined function: bar() in /home/httpd/html/PHP/test/3.php on line 14 I'm using php-cli from cvs (2 weeks ago). And there is a variable scope (for the class). -- michel 'ziobudda' morelli <michel@ziobudda.net>

« previous php.dev (#93876) next »