Re: [PHP] non static function called as static one

2009-03-11 Thread Olivier Doucet
Hi Jochem, > > 2/ (or/and) Raise a warning or an error if a non static function is > called > > as a static one > > develop with error_reporting set to E_ALL | E_STRICT, then you'll get a big > fat > warning about it Yes, that's what I'm using right now. Although, that's not the highlighted pro

[PHP] non static function called as static one

2009-03-11 Thread Olivier Doucet
Hello everyone, I'm wondering if the following behaviour is a bug or a feature. The case is quite complex, so let me explain my point of view. here is the source : test(); //output: "MySecondTest" ?> Let me explain : In this case, $this is MySecondTest, which is relevant as it is the last object