Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:56670 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 70289 invoked from network); 30 Nov 2011 00:53:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Nov 2011 00:53:16 -0000 Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lerdorf.com from 209.85.210.170 cause and error) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 209.85.210.170 mail-iy0-f170.google.com Received: from [209.85.210.170] ([209.85.210.170:54998] helo=mail-iy0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 71/00-04068-C7E75DE4 for ; Tue, 29 Nov 2011 19:53:16 -0500 Received: by iakc1 with SMTP id c1so12998741iak.29 for ; Tue, 29 Nov 2011 16:53:13 -0800 (PST) Received: by 10.42.154.7 with SMTP id o7mr136446icw.48.1322614393576; Tue, 29 Nov 2011 16:53:13 -0800 (PST) Received: from [192.168.200.5] (c-50-131-44-225.hsd1.ca.comcast.net. [50.131.44.225]) by mx.google.com with ESMTPS id eh34sm821969ibb.5.2011.11.29.16.53.12 (version=SSLv3 cipher=OTHER); Tue, 29 Nov 2011 16:53:12 -0800 (PST) Message-ID: <4ED57E77.4080205@lerdorf.com> Date: Tue, 29 Nov 2011 16:53:11 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: devis@lucato.it CC: PHP internals References: In-Reply-To: X-Enigmail-Version: 1.4a1pre Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] New dereferencing syntaxes in 5.4 From: rasmus@lerdorf.com (Rasmus Lerdorf) On 11/29/2011 04:49 PM, devis@lucato.it wrote: > Hi, > > is the new dereferencing syntax definitely part of 5.4 ? > > Will it be possible to replace this: > > $model = new DomainModel('foo', 'bar'); > $result = $model->findByName('John'); > > with: > > $result = (new DomainModel('foo', 'bar'))->findByName('John'); > > ? Why don't you try it? Download the latest RC from qa.php.net ./configure && make && make test (and send us the results) and then you can test your code snippet. -Rasmus