Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:50608 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 78376 invoked from network); 26 Nov 2010 21:58:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Nov 2010 21:58:01 -0000 Authentication-Results: pb1.pair.com header.from=mailinglists@bobbyhensley.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=mailinglists@bobbyhensley.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain bobbyhensley.com from 209.85.216.42 cause and error) X-PHP-List-Original-Sender: mailinglists@bobbyhensley.com X-Host-Fingerprint: 209.85.216.42 mail-qw0-f42.google.com Received: from [209.85.216.42] ([209.85.216.42:37831] helo=mail-qw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 07/12-00463-66D20FC4 for ; Fri, 26 Nov 2010 16:58:01 -0500 Received: by qwh6 with SMTP id 6so99815qwh.29 for ; Fri, 26 Nov 2010 13:57:56 -0800 (PST) Received: by 10.229.97.13 with SMTP id j13mr2066967qcn.251.1290802087680; Fri, 26 Nov 2010 12:08:07 -0800 (PST) Received: from [10.0.0.50] (cpe-74-75-100-237.maine.res.rr.com [74.75.100.237]) by mx.google.com with ESMTPS id u2sm1403592qcq.31.2010.11.26.12.08.06 (version=SSLv3 cipher=RC4-MD5); Fri, 26 Nov 2010 12:08:07 -0800 (PST) Message-ID: <4CF01391.50800@bobbyhensley.com> Date: Fri, 26 Nov 2010 15:07:45 -0500 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.12) Gecko/20101027 Lightning/1.0b2 Thunderbird/3.1.6 MIME-Version: 1.0 To: internals@lists.php.net References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] new foo()->bar() From: mailinglists@bobbyhensley.com (Bob Hensley) On 11/26/2010 2: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 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? > I fully support this patch. This is something PHP has needed for a long time.