PHP Idiosyncrasies #3
class A {
function foo() {
$this->foo = 1;
}
}
class B {
function bar() {
A::foo();
$this->bar = 1;
}
}
$obj = new B();
$obj->bar();
var_dump($obj);
object(B)#1 (2) {
["foo"]=>
int(1)
["bar"]=>
int(1)
}
What the...?