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

From: Date: Tue, 11 Sep 2007 16:32:40 +0000
Subject: Re: [PEPr] Comment on Web Services::Services_TinyURL
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-47986@lists.php.net to get a copy of this message
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. Sascha

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