Hi,

On Tue, 2010-01-19 at 12:31 +0100, Michael Wallner wrote:
> On 01/19/2010 01:27 AM, Stanislav Malyshev wrote:
> > Hi!
> > 
> > I wrote a small patch that enables this kind of syntax in PHP:
> > 
> > foo()();

I think that becomes hard to read quite easily.

> I'd rather see two other things that are missing, support for
> dynamic object and array de-referencing like
> (new class)->method() and get_array()["index"].

For the latter - there's a patch by some user in the bug tracker, which
I can't find right now.

Having $foo[0]->bar(); and $foo()[0];  it might also make sense to allow
more of these, like the proposed foo()() but other than such consistency
I don't really like it ....

johannes


-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to