On Tue, 2010-06-08 at 12:23 +0200, Jacob Oettinger wrote:
> Would it be equally simple to allow the syntax below?
> 
> $result = new ResultMaker()->getIt();

does this mean 

    $result = new (ResultMaker()->getIt());

or

    $result = (new ResultMaker())->getIt();

I assume the later, but that is non-obvious as we allow

    $result = new $class();

> and
> 
> $resultOfFunc = returnsFunc()();

Having closures this might make sense. (While I don't want to debug code
like  $foo("bar")[42]->do()("it"); )


Oh and obviously +1 on the original patch. ;-)

johannes



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

Reply via email to