Re: Feature request

From: Date: Fri, 10 Nov 2006 05:48:16 +0000
Subject: Re: Feature request
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-26453@lists.php.net to get a copy of this message
There are some cases where this could start becoming quite challenging and we might get into reference counting/separation problems, i.e.: function foo() { return array(1,2,3); } foo()[1] = 4;
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. -- Stanislav Malyshev, Zend Products Engineer stas@zend.com http://www.zend.com/

« previous php.internals (#26453) next »