RE: [PHP-DEV] [RFC] Array Dereferencing
| From: | Dennis Haarbrink | Date: | Tue, 08 Jun 2010 14:48:26 +0000 |
| Subject: | RE: [PHP-DEV] [RFC] Array Dereferencing | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-48689@lists.php.net to get a copy of this message | ||
> -----Oorspronkelijk bericht-----
> Van: Lars Schultz [mailto:lars.schultz@toolpark.com]
> Verzonden: dinsdag 8 juni 2010 16:04
> Aan: internals@lists.php.net
> Onderwerp: Re: [PHP-DEV] [RFC] Array Dereferencing
>
> >> $result = new ResultMaker()->getIt();
>
> I know that this is not much of an argument, but it works the same way
> in Javascript too, which is very convenient. The intended behaviour is
> obvious...even though it could be (mis-)interpreted by php.
>
> Lars
>
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
I agree, this is obviously the intended behaviour.
As long as the door is still open to do:
$result = new (ResultMaker()->getIt());
To create an object of the class returned by the getIt() method.
-Dennis