Re: Inline constructing/cloning and inline foreach listing
| From: | Felipe Pena | Date: | Tue, 07 Jun 2011 13:47:29 +0000 |
| Subject: | Re: Inline constructing/cloning and inline foreach listing | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-53140@lists.php.net to get a copy of this message | ||
Hi,
2011/6/7 Hannes Landeholm <landeholm@gmail.com>
> Hi,
>
> I like to do stuff "inline" instead of cluttering my code with variables.
> There are currently three syntaxes/expressions which are currently not
> supported but I hope could be implemented until 5.4.
>
> First inline constructing (which I think has already previously been
> discussed), but also cloning, e.g:
>
> // Inline constructing:
> $car = (new CarFactory())->makeCar();
>
I've already proposed such feature:
https://wiki.php.net/rfc/instance-method-call
Thread: http://markmail.org/thread/4rr3w52k5hfxi4qs
--
Regards,
Felipe Pena