Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:35371 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 4774 invoked by uid 1010); 11 Feb 2008 13:03:53 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 4758 invoked from network); 11 Feb 2008 13:03:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Feb 2008 13:03:53 -0000 Authentication-Results: pb1.pair.com header.from=mbechler@epplehaus.de; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=mbechler@epplehaus.de; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain epplehaus.de from 212.227.83.217 cause and error) X-PHP-List-Original-Sender: mbechler@epplehaus.de X-Host-Fingerprint: 212.227.83.217 phoenix.epplehaus.de Linux 2.5 (sometimes 2.4) (4) Received: from [212.227.83.217] ([212.227.83.217:46938] helo=server1.epplehaus.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A3/10-64922-7B740B74 for ; Mon, 11 Feb 2008 08:03:52 -0500 Received: from localhost (unknown [127.0.0.1]) by server1.epplehaus.de (Postfix) with ESMTP id 5C0EEB8020 for ; Mon, 11 Feb 2008 13:03:48 +0000 (UTC) X-Virus-Scanned: by amavisd-new at epplehaus.de Received: from server1.epplehaus.de ([127.0.0.1]) by localhost (mail.epplehaus.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DyUksHKGitUF for ; Mon, 11 Feb 2008 14:03:47 +0100 (CET) Received: from [192.168.0.86] (p5B2F58C2.dip.t-dialin.net [91.47.88.194]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by server1.epplehaus.de (Postfix) with ESMTP id 1B1B3B8019 for ; Mon, 11 Feb 2008 14:03:47 +0100 (CET) Message-ID: <47B047B2.9020001@epplehaus.de> Date: Mon, 11 Feb 2008 14:03:46 +0100 User-Agent: Thunderbird 2.0.0.9 (X11/20071201) MIME-Version: 1.0 To: internals@lists.php.net References: <5F.AA.64922.495BFA74@pb1.pair.com> In-Reply-To: <5F.AA.64922.495BFA74@pb1.pair.com> X-Enigmail-Version: 0.95.5 OpenPGP: url=hkp-x://random.sks.keyserver.penguin.de Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Problems with LSB From: mbechler@epplehaus.de (Moritz Bechler) -----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. > > 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-----