Re: New dereferencing syntaxes in 5.4
| From: | Rasmus Lerdorf | Date: | Wed, 30 Nov 2011 00:53:11 +0000 |
| Subject: | Re: New dereferencing syntaxes in 5.4 | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-56670@lists.php.net to get a copy of this message | ||
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