Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:56674 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 86124 invoked from network); 30 Nov 2011 03:55:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Nov 2011 03:55:48 -0000 Authentication-Results: pb1.pair.com header.from=i@morfi.ru; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=i@morfi.ru; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain morfi.ru designates 209.85.210.170 as permitted sender) X-PHP-List-Original-Sender: i@morfi.ru X-Host-Fingerprint: 209.85.210.170 mail-iy0-f170.google.com Received: from [209.85.210.170] ([209.85.210.170:56985] helo=mail-iy0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 50/A2-04068-249A5DE4 for ; Tue, 29 Nov 2011 22:55:47 -0500 Received: by iakc1 with SMTP id c1so110589iak.29 for ; Tue, 29 Nov 2011 19:55:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=morfi.ru; s=mail; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=NIOVuCW0yKvtKdJpbY+H41IVw9HC69NCR2GkNfSSrLE=; b=z8C0msX6i8kU6QXzvrWxj2+yD20N8FnEJksQ9AmgY6YbIXYELC2towSdx/EymwmEmU kZqbmxtcU2NSqqM5rGtA1xa56Cl7iH8qN3dg47zYORyoDesgZTe3RPZCwga1YtAepIUV Vnp6jN57uyRFk/VnvE2bPMSWzQXOVHuTZiKTU= Received: by 10.42.29.137 with SMTP id r9mr709095icc.20.1322625344414; Tue, 29 Nov 2011 19:55:44 -0800 (PST) MIME-Version: 1.0 Received: by 10.231.61.198 with HTTP; Tue, 29 Nov 2011 19:55:23 -0800 (PST) In-Reply-To: <4ED58D0F.1070503@lerdorf.com> References: <4ED57E77.4080205@lerdorf.com> <4ED58D0F.1070503@lerdorf.com> Date: Wed, 30 Nov 2011 07:55:23 +0400 Message-ID: To: Rasmus Lerdorf Cc: PHP internals Content-Type: multipart/alternative; boundary=20cf30434930d321f104b2ebb572 Subject: Re: [PHP-DEV] New dereferencing syntaxes in 5.4 From: i@morfi.ru (Morfi) --20cf30434930d321f104b2ebb572 Content-Type: text/plain; charset=ISO-8859-1 Why not possible? $result = ($model = new DomainModel('foo', 'bar'))->findByName('John'); On Wed, Nov 30, 2011 at 5:55 AM, Rasmus Lerdorf wrote: > On 11/29/2011 05:22 PM, devis@lucato.it wrote: > > Hi Rasmus, > > > > I already tested a similar example (see > > http://codepad.viper-7.com/tNkTTX) but I'm getting > > Sorry, pasting something into codepad doesn't qualify as testing. You > have no idea how and when they built the 5.4 they are running. Until the > first release, 5.4 is a moving target. And everyone who posts to > internals are expected to be able to download and install 5.4 on their own. > > But to answer your question, yes, that syntax will work fine. It is > right out of the UPGRADING file at: > > > http://svn.php.net/viewvc/php/php-src/branches/PHP_5_4/UPGRADING?view=markup > > which says: > > - Class member access on instantiation: > (new foo)->method() > (new foo)->property > (new foo)[0] > > -Rasmus > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --20cf30434930d321f104b2ebb572--