Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:33430 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 43298 invoked by uid 1010); 25 Nov 2007 23:26:10 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 43283 invoked from network); 25 Nov 2007 23:26:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Nov 2007 23:26:09 -0000 Authentication-Results: pb1.pair.com header.from=ekneuss@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=ekneuss@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.132.243 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: ekneuss@gmail.com X-Host-Fingerprint: 209.85.132.243 an-out-0708.google.com Received: from [209.85.132.243] ([209.85.132.243:62342] helo=an-out-0708.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 79/92-22974-0940A474 for ; Sun, 25 Nov 2007 18:26:08 -0500 Received: by an-out-0708.google.com with SMTP id c18so68184anc for ; Sun, 25 Nov 2007 15:26:06 -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:sender:to:subject:cc:in-reply-to:mime-version:content-type:references:x-google-sender-auth; bh=yZBIb0t7VTMcTSWScsBdoqAMJec7rsx5x2qIirW/KhQ=; b=FNukttjbw6tZeBLKZPi2YdAWjyHz5RPrUf3FpnkwKFzqAv72jq7GoioCYAYobd4Ua7jlqTKMi+u8Y91nJqdtgxx75XUsA86xeT7BSQ2dXJO50PzuE0lihf4OxBsErtzEVR98PEIb/VyJCS0KO8UWuLW4mQ/PjYk5c8xrLyfD8Vs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:references:x-google-sender-auth; b=QOz5+oBEm0RQHsAOCDI4O1kEvsrPDOxYn9RXFpo5thnB2L/MjEvTXCS1aCTkAR5gtr2Ar4tETYTQRZIvy1DwBuvPiz8jJuzoTBcXd/iKNPzFO396MedqycmkFMSgKTbRoIWFiERbqmnK/pfIpuHfdIHCgB0qADzd3T6oMiZAPKs= Received: by 10.70.87.5 with SMTP id k5mr3662772wxb.1196033153995; Sun, 25 Nov 2007 15:25:53 -0800 (PST) Received: by 10.70.41.7 with HTTP; Sun, 25 Nov 2007 15:25:53 -0800 (PST) Message-ID: Date: Mon, 26 Nov 2007 00:25:53 +0100 Sender: ekneuss@gmail.com To: "Jeff Moore" Cc: "PHP Developers Mailing List" In-Reply-To: <98D03EE5-9F71-4D12-B212-1A8D325BCF2C@procata.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_2874_31388184.1196033153974" References: <4740C654.3020302@digitalsandwich.com> <47424B4F.2@zend.com> <4743CED7.5050402@avalon.aut.bme.hu> <10845a340711230118t6c19243cg812f22858e3a3c75@mail.gmail.com> <10845a340711230121j1e06040bw15953d02330b622@mail.gmail.com> <388489975.20071123122230@marcus-boerger.de> <4746d50a.1d255e0a.40ab.6e50@mx.google.com> <98D03EE5-9F71-4D12-B212-1A8D325BCF2C@procata.com> X-Google-Sender-Auth: fb2fc7ce557db2f0 Subject: Re: [PHP-DEV] late static binding php6 From: colder@php.net ("Etienne Kneuss") ------=_Part_2874_31388184.1196033153974 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, On Nov 25, 2007 11:45 PM, Jeff Moore wrote: > > Hi, > > May I suggest renaming get_called_class() to get_static_class() to > correspond with the use of the static:: keyword for late binding. It was already kind of discussed, and get_called_class makes more sense IMO. "static class" is not self-descriptive. The class returned is the class that was initially referenced for the call, as in the class "called" initially. > parent:: and get_parent_class() [no parameters] should also correspond > when used in a static method context. They do, parent::foo(); should be the same as $class = get_parent_class(); $class::foo(); Of course, we can't make parent:: reference the parent class of the called one, as it would break BC. As in: class A { } class B extends A { public static function test() { echo get_class(new parent), '-', get_parent_class(); } } class C extends B { } C::test(); // A-A and not B-B > > > My preference is that parent:: be late binding. I would also like to > see an early bound __parent__ constant along the lines of __class__. > > Best Regards, > > Jeff > > -- > 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 ------=_Part_2874_31388184.1196033153974--