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

2009-03-11 Thread Jochem Maas
Nathan Rixham schreef: > Nathan Rixham wrote: >> Jochem Maas wrote: >>> Olivier Doucet schreef: > >> mental though, part of me wishes they'd forked php at 4 to save all >> the lame syntax and weirdness. >> > > after thought.. I wish they'd forked it to OO and procedural, then us OO > guys could h

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

2009-03-11 Thread Nathan Rixham
Nathan Rixham wrote: Jochem Maas wrote: Olivier Doucet schreef: mental though, part of me wishes they'd forked php at 4 to save all the lame syntax and weirdness. after thought.. I wish they'd forked it to OO and procedural, then us OO guys could have phpoo and be happy, and the procedur

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

2009-03-11 Thread Nathan Rixham
Jochem Maas wrote: Olivier Doucet schreef: 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

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

2009-03-11 Thread Jochem Maas
Olivier Doucet schreef: > 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. Al

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

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

2009-03-11 Thread Jochem Maas
Olivier Doucet schreef: > 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 : > > > class MyTest { > public function myfunc() { > echo get_class($this); > } > } >

[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