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
--
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php
|