Re: [PHP] Function variables in classes

2007-11-02 Thread rohini
Hi paul, Why you are trying to use the scope resolution operator see you can use this way simply. Code: ** ?php class foobar { function bar2 () { echo Yep, in bar2() right now\n; } public function foo2 () { $a = bar2;// Experiment 0 $a();

Re: [PHP] Function variables in classes

2007-11-02 Thread Nathan Nobbe
On 11/2/07, rohini [EMAIL PROTECTED] wrote: Hi paul, Why you are trying to use the scope resolution operator see you can use this way simply. Code: ** ?php class foobar { function bar2 () { echo Yep, in bar2() right now\n; } public function foo2 () {

Re: [PHP] Function variables in classes

2007-11-01 Thread Ivar van der Burg
Try using parent::bar2(); instead of foobar::bar2(); Op 1-nov-2007, om 12:10 heeft Paul van Haren het volgende geschreven: Hi there, I'm trying to execute function variables. This works fine outside class code, but gives a fatal error when run within a class. The demo code is here:

Re: [PHP] Function variables in classes

2007-11-01 Thread Paul van Haren
I just did. The result is the same however Regards, Paul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Function variables in classes

2007-11-01 Thread Eric Butera
On Nov 1, 2007, at 7:10 AM, Paul van Haren wrote: Hi there, I'm trying to execute function variables. This works fine outside class code, but gives a fatal error when run within a class. The demo code is here: ?php function bar1 () { echo Yep, in bar1() right

Re: [PHP] Function variables in classes

2007-11-01 Thread Nathan Nobbe
On 11/1/07, Eric Butera [EMAIL PROTECTED] wrote: I don't know if this has been said yet, but in 5.3 they added this: Dynamic static calls: $c = classname; $c::someMetod(); apparently it works in 5.2.4 as well: ?php class Foo { static public function staticMethod() { echo