-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

My original reply missed the list :|

Hi,

>
> i've written the following code using Etiennes LSB. But I'm facing some
> problems.
>
> <?php
>     class A {
>         function foo() {
>             echo get_called_class();
>         }
>     }
>
>     class B extends A {
>     }
>
>     class C {
>         function moo() {
>             B::foo();
>         }
>     }
>
>     B::foo();   // echos "B" - good
>
>     $c = new C;
>     $c->moo();  // echos "C" - wtf?? should be B
> ?>
>
> Is it a bug, or did I miss anything?
>

If you mark your function "foo" static - as you should - its "BB" for me.

Moritz Bechler



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHsEeydLVsKnwBr9YRAu8LAJ4+/pnKZ1YzM0wN9k7Vg9eyWaZnUQCeKTrO
hgv4dRz1YtLqHRgagUOKwQA=
=cxLj
-----END PGP SIGNATURE-----

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to