Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:50612 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 91628 invoked from network); 26 Nov 2010 23:45:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Nov 2010 23:45:50 -0000 Authentication-Results: pb1.pair.com header.from=pierrick@webstart.fr; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=pierrick@webstart.fr; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain webstart.fr from 209.85.214.170 cause and error) X-PHP-List-Original-Sender: pierrick@webstart.fr X-Host-Fingerprint: 209.85.214.170 mail-iw0-f170.google.com Received: from [209.85.214.170] ([209.85.214.170:35798] helo=mail-iw0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 72/21-15391-DA640FC4 for ; Fri, 26 Nov 2010 18:45:50 -0500 Received: by iwn4 with SMTP id 4so64854iwn.29 for ; Fri, 26 Nov 2010 15:45:46 -0800 (PST) MIME-Version: 1.0 Received: by 10.231.35.202 with SMTP id q10mr2194943ibd.88.1290815146056; Fri, 26 Nov 2010 15:45:46 -0800 (PST) Received: by 10.231.15.196 with HTTP; Fri, 26 Nov 2010 15:45:45 -0800 (PST) In-Reply-To: References: Date: Fri, 26 Nov 2010 18:45:46 -0500 Message-ID: To: Felipe Pena Cc: internals Content-Type: multipart/alternative; boundary=0003255730b2405f670495fd520b Subject: Re: [PHP-DEV] [RFC] new foo()->bar() From: pierrick@webstart.fr (Pierrick Charron) --0003255730b2405f670495fd520b Content-Type: text/plain; charset=ISO-8859-1 +1 Good job felipe On 26 November 2010 14:36, 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 properties > on same command. > > Example: > > > class bar { > public $x = 'PHP'; > } > > class foo extends bar { > public function bar() { > return $this; > } > } > > 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 > --0003255730b2405f670495fd520b--