Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:50611 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 85198 invoked from network); 26 Nov 2010 22:40:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Nov 2010 22:40:25 -0000 Authentication-Results: pb1.pair.com header.from=simpleshot@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=simpleshot@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.170 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: simpleshot@gmail.com X-Host-Fingerprint: 209.85.215.170 mail-ey0-f170.google.com Received: from [209.85.215.170] ([209.85.215.170:55403] helo=mail-ey0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 35/80-15391-75730FC4 for ; Fri, 26 Nov 2010 17:40:24 -0500 Received: by eyf5 with SMTP id 5so1181324eyf.29 for ; Fri, 26 Nov 2010 14:40:21 -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:content-type; bh=IWuySEeXRcf6ASKI+cqiOTBfZTVKHGUrLVJF5VsiSRM=; b=CdSuZFp71/gU7NfHKupGwxozIw/Lr4q0p+VbDl4Pfg8h0H0unpuHhkdr2DLEeZocQS JDWbq9b7mlVhbAvzfwDv177YutdbdGtPf5PlqmqE8BnUdMDViLYdSA5uDbyGk16sD/Yb Vktj+fzVhZ8p9sYGSoRVrNFBn6lRRD1vBPNak= 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 :content-type; b=B6lFXhc6kqGwX+yOHqxRHhxY0G/I4P+UDkutmBdvC9767RjjRv4fwuTHgd3c/PvaMj 3XQtJk3DjsVHtDBTpjTCHBW5WKaHlkOkvHD7ENl3RaxfO3qNH5ZLZXFC9nbWA4Ecpim6 mkQEv+BYdVcllnnYn1nFvgnfldWzrkITBa/q4= MIME-Version: 1.0 Received: by 10.213.114.146 with SMTP id e18mr160367ebq.29.1290811220923; Fri, 26 Nov 2010 14:40:20 -0800 (PST) Received: by 10.213.31.147 with HTTP; Fri, 26 Nov 2010 14:40:20 -0800 (PST) In-Reply-To: References: Date: Fri, 26 Nov 2010 17:40:20 -0500 Message-ID: To: PHP Development Content-Type: multipart/alternative; boundary=000e0cd1fbe04b95ac0495fc68bd Subject: Re: [PHP-DEV] [RFC] new foo()->bar() From: simpleshot@gmail.com (Adam Richardson) --000e0cd1fbe04b95ac0495fc68bd Content-Type: text/plain; charset=ISO-8859-1 On Fri, Nov 26, 2010 at 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? > > -- > Regards, > Felipe Pena > Felipe, you're on a roll :) It's great! Adam -- Nephtali: PHP web framework that functions beautifully http://nephtaliproject.com --000e0cd1fbe04b95ac0495fc68bd--