Hello,
Making a mistake I just come to discover ( for myself ) a strange fiture in
php,
lets see an example :
class A{
public $foo = 'bar';
public function write(){
print($this->foo);
}
}
class B{
public $foo = 'gnagnagna';
public function write(){
A::write();
}
}
$var = new B;
$var->write();
This code will not throw excaption and output gnagnagna, it's kind of cross
définition something,
I know something like that exists in other language but I didn't expect PHP
to work like that.
Do you know this ? And why ?