extract(EXTR_REFS) and pass-by-reference

From: Date: Sun, 02 Jan 2005 06:35:05 +0000
Subject: extract(EXTR_REFS) and pass-by-reference
Groups: php.internals 
Request: Send a blank email to internals+get-14260@lists.php.net to get a copy of this message
Hi there, I'm now looking into the three extract() bugs related to each other, namely bug #25708, bug #29493 and bug #31213. It turned out after all that these problems are caused by a inevitable zval separation on sending arguments to the function and there seems to be no feasible workaround for now. I got stuck with a couple of mentioned ways that fix the problem just partly, not entirely. a. Specify first_arg_force_ref to PHP_FE(extract). This will cause the engine to yell a only-variables-can-be-passed-by-reference! when you directly pass a scalar (temporary variable) to it. b. Turn on allow_call_time_pass_by_reference. This is anyway deprecated, but looks like the best way around from the my point of view. Any suggestions will be appreciated. Moriyoshi

« previous php.internals (#14260) next »