Posted by Johannes Permoser on 01/24/08 21:48
Hi,
i have a class that calls a static function:
class Peter
{
static function foo() {echo 123;}
public static function bar ()
{
Peter::foo();
}
}
$p = new Peter();
$p->bar();
Now i want to extend the class and override the foo() function. However when
calling bar(), it will still execute the code defined in Peter and not the
override. I tried $this::foo(), but it doesn't work.
How can i solve this?
[Back to original message]
|