Re: [PHP-WIN]static call to an instance method in a class definition

2010-07-22 Thread Ferenc Kovacs
Hi. I knew about this "feature" ($this is used from the caller scope if the called method is static), but I didn't checked the manual about this. Now I did it. http://php.net/manual/en/language.oop5.static.php "Because static methods are callable without an instance of the object created, the pse

[PHP-WIN]static call to an instance method in a class definition

2010-07-22 Thread samuel
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 =