Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:50615 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 5910 invoked from network); 27 Nov 2010 00:54:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Nov 2010 00:54:43 -0000 Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.161.42 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.161.42 mail-fx0-f42.google.com Received: from [209.85.161.42] ([209.85.161.42:39129] helo=mail-fx0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F5/A3-15391-0D650FC4 for ; Fri, 26 Nov 2010 19:54:41 -0500 Received: by fxm11 with SMTP id 11so1987388fxm.29 for ; Fri, 26 Nov 2010 16:54:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=YuPgQobX3+Z+TpjLusFPkla3er/jAc3CoswgVS+KGaU=; b=ifj/+82P08SjpWfkQusrJ3WqIKBqEbIHqMdmKSh1ojuRCj4nBId7wOUxYTA2frM6Gb 16vhqvllT+1rtXSMjlr1RmLK9tnJ2zdp6QPu3AKS6F4Qjl15BzSiuydqhc5OZYZz8QBg 5jR4y2dcprUO1FMsL+Xx3K0V1ByJcei7/gy40= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=n5IEg0+yDAMZAoMhcCtiG3G/87Q+vlohJ3OGyzJukGILnJftR1moilh0WAzifbi2K7 hFSZ39CLxjclfj274eKe2RZolB+hzY1lO32zCkcPI/fQLkKg6zK92sne/EQ9J1KxR8MD kLxooCzqrcVS83Wvw1K6f/h4MtAFjlXcfI9jg= MIME-Version: 1.0 Received: by 10.223.96.137 with SMTP id h9mr2670836fan.54.1290819276190; Fri, 26 Nov 2010 16:54:36 -0800 (PST) Received: by 10.223.83.142 with HTTP; Fri, 26 Nov 2010 16:54:36 -0800 (PST) In-Reply-To: References: Date: Sat, 27 Nov 2010 01:54:36 +0100 Message-ID: To: Felipe Pena Cc: internals Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC] new foo()->bar() From: pierre.php@gmail.com (Pierre Joye) +1 :) On Fri, Nov 26, 2010 at 8:36 PM, Felipe Pena wrote: > Hi all, > I'm here again to presents another proposal, which adds support for > instantiating a class and calling its methods and accessing its propertie= s > on same command. > > Example: > > > class bar { > =A0public $x =3D 'PHP'; > } > > class foo extends bar { > =A0public function bar() { > =A0 =A0return $this; > =A0} > } > > var_dump(new foo()->bar()->x); // string(3) "PHP" > > ?> > > Other examples which describes the feature at > http://wiki.php.net/rfc/instance-method-call > > Thoughts? > > -- > Regards, > Felipe Pena > --=20 Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org