Hi,
yes, afaik it's intentional. This was made for making parent::foo() work.
Here's a shorter (at least a bit shorter *g*) example of this behavior:
<?php
class foo {
function a() {
bar::b();
}
}
class bar {
function b() {
var_dump($this);
}
}
$foo = new foo();
$foo->a(); // Calls bar::b()
?>
Prints:
object(foo)#1 (0) {
}
So in a static call $this holds the instance of the calling object.
johannes
Ard Biesheuvel wrote: