Re: Feature request

From: Date: Fri, 10 Nov 2006 12:05:05 +0000
Subject: Re: Feature request
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-26461@lists.php.net to get a copy of this message
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.

« previous php.internals (#26461) next »