Re: Again scope

From: Date: Fri, 31 Jan 2003 20:08:30 +0000
Subject: Re: Again scope
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-93878@lists.php.net to get a copy of this message
This isn't a PHP problem. use $this->Bar(); on line 14 On Fri, 2003-01-31 at 15:03, michel 'ziobudda' morelli wrote: > <? > 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> -- Xavier Spriet <xavier@wuug.org>

« previous php.dev (#93878) next »