Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:35544 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 23833 invoked by uid 1010); 18 Feb 2008 03:26:34 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 23818 invoked from network); 18 Feb 2008 03:26:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Feb 2008 03:26:34 -0000 Authentication-Results: pb1.pair.com header.from=diogin@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=diogin@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.198.184 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: diogin@gmail.com X-Host-Fingerprint: 209.85.198.184 rv-out-0910.google.com Received: from [209.85.198.184] ([209.85.198.184:44799] helo=rv-out-0910.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EA/81-04659-5EAF8B74 for ; Sun, 17 Feb 2008 22:26:33 -0500 Received: by rv-out-0910.google.com with SMTP id k15so1495619rvb.23 for ; Sun, 17 Feb 2008 19:26:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=W5DfHWs4iPMyAwuoEZIwwxi8sRQS2vuilEOEDmzF43E=; b=h267PUcsSkLdxHI96UD+DmgsTU9KdKHB8kt4OcTjynol8hRKT5cTREZj4uGIarwspv6sWUxdSNAwo3zJzb/DmwVlP3rzDkkjeWjB9CjkarI5UtbzfPSA6vrjSchRQJ9zgqVLuSnWLJKLddzPN/Wkf7ScLJRb/X67TYlM3kCfaLo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=g7D2oq9LehPrN3JLnjB+1MH80vhLYBZWuitoED1mG06dfWwHpcgGEAgn73trW4edA20AeBxWnLeB5JcOLkyv1uDgpU2Fsqy7pOWTkHu/EvDKIBgw3lRW6ofjD92hJlccia7lxue3iK4CHmnKGkU2ICK2Leh6v7vnzLL+txMBwss= Received: by 10.140.203.15 with SMTP id a15mr3487469rvg.212.1203305180544; Sun, 17 Feb 2008 19:26:20 -0800 (PST) Received: by 10.141.169.1 with HTTP; Sun, 17 Feb 2008 19:26:20 -0800 (PST) Message-ID: Date: Mon, 18 Feb 2008 11:26:20 +0800 To: "Etienne Kneuss" Cc: php-dev In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_2084_22493310.1203305180537" References: <5F.AA.64922.495BFA74@pb1.pair.com> <345fd5cd0802110319n375a2824sd0194b2486f226e2@mail.gmail.com> <88.F9.64922.3E330B74@pb1.pair.com> Subject: Re: [PHP-DEV] Problems with LSB From: diogin@gmail.com ("Jingcheng Zhang") ------=_Part_2084_22493310.1203305180537 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello Etienne, If static:: in static context behaves like $this in object context, it would be much meaningful. If we introduce the "meta class" concept in PHP, then each class is an instance of the meta class, thus we can treat a class as an object, and then it is natural that static members follow the rules of inheritance. This may matches the running style of PHP better, which differs from other languages as PHP (under web environment) activates classes when request arrives, and shutdown them when request finishes, while other Object-Oriented languages persist classes and objects in memory. On Feb 11, 2008 9:03 PM, Etienne Kneuss wrote: > Hello, > > your foo function is not defined as static, hence no static call is done. > > Strict Standards: Non-static method A::foo() should not be called > statically, assuming $this from incompatible context ... > > Define your method as static and it should work just fine. > > Regards > > On Feb 11, 2008 12:39 PM, Sebastian Deutsch > > wrote: > > Hello, > > > > care... my case is slightly different. I was aware of that problem, but > > in my case I call B::foo() from the main scope - it behaves right - > > when I call it within the scope of C (same call) it behaves different. > > > > This is different as described in the bug. The same call should > > have the same output, not depending of the scope where I call it. > > > > Sebastian > > > > Lokrain schrieb: > > > > > > > Hello, Sebastian > > > > > > This seems to be a known bug http://bugs.php.net/bug.php?id=43408 and > in > > > fact already assigned. > > > > > > Fallbacks occur in static/self calls, as static/self resolve to "foo" > > >> and it returns foo as expected. > > >> > > >> However, when you do a parent::demo() you actually call bar::demo(), > > >> which is currently understood as a "fully qualified call": the caller > is > > >> not passed. > > >> > > >> There are plans to allow explicit parent call to pass the caller, but > > >> this is *still under discussion*. > > >> > > >> > > > > > > > > > -- > > PHP Internals - PHP Runtime Development Mailing List > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > -- > Etienne Kneuss > http://www.colder.ch > > Men never do evil so completely and cheerfully as > when they do it from a religious conviction. > -- Pascal > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Best regards, Jingcheng Zhang Room 304, Dormitory 26 of Yuquan Campus, Zhejiang University P.R.China ------=_Part_2084_22493310.1203305180537--