Stanislav Malyshev wrote:
I'd say expression(f()[1]) means $tmp = f(); expression($tmp); unset($tmp); which here means:
$tmp = foo();
$tmp[1] = 4;
unset($tmp);

which is meaningless but should work. IIRC the engine can make free's at the end of expression, so it shouldn't be big problem. Actually, any assignment to it if it's not returned by-ref is meaningless, but syntactically ok.


foo() = 4;   results in:

Fatal error: Can't use function return value in write context in test on line 12.

foo()[1] = 4;   should do the same.

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

Reply via email to