Re: [PEPr] Comment on Web Services::Services_TinyURL

From: Date: Tue, 11 Sep 2007 16:36:31 +0000
Subject: Re: [PEPr] Comment on Web Services::Services_TinyURL
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-47987@lists.php.net to get a copy of this message
On 9/11/07, Sascha Grossenbacher <saschagros@bluewin.ch> wrote: > Hi > > On Tue, 11 Sep 2007 09:17:56 -0700, Joe Stump <joe@joestump.net> wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA1 > > > >> No notice, no E_STRICT. Seems to be fine. Hence, Travis can extend the > >> class for unittests without making the code any more complicated. ;-) > > > > Since when does PHP5 allow you to call static methods non-statically > > without throwing a notice? This is news to me. > > It seems that a static function is always called static, even with $test->staticMethod()... > > Simple Test: > <?php > class Test > { > public static function testMethod() { > var_dump($this); > } > } > > $test = new Test(); > $test->testMethod(); > > Test::testMethod(); > > > outputs twice(!) a notice about the undefined variable $this and null. Interesting, and good to know. Didn't think of that. @Travis: Would this still work for you though? ;-) Till

« previous php.pear.dev (#47987) next »