Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:14262 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 50659 invoked by uid 1010); 2 Jan 2005 12:23:25 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 50640 invoked from network); 2 Jan 2005 12:23:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Jan 2005 12:23:25 -0000 X-Host-Fingerprint: 83.97.50.139 jan.prima.de FreeBSD 4.6-4.9 Received: from ([83.97.50.139:2253] helo=jan.prima.de) by pb1.pair.com (ecelerity HEAD (r3992M)) with SMTP id BE/A6-39595-BB7E7D14 for ; Sun, 02 Jan 2005 07:23:24 -0500 Received: from BAUMBART (p508EBB3B.dip.t-dialin.net [::ffff:80.142.187.59]) (IDENT: HydraIRC, AUTH: LOGIN tobi) by jan.prima.de with esmtp; Sun, 02 Jan 2005 12:22:13 +0000 Date: Sun, 2 Jan 2005 13:23:17 +0100 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <1087815912.20050102132317@marcus-boerger.de> To: Andi Gutmans , Moriyoshi Koizumi CC: internals List Developers Mailing In-Reply-To: <7019D254-5C88-11D9-9696-000A95CE0C62@at.wakwak.com> References: <7019D254-5C88-11D9-9696-000A95CE0C62@at.wakwak.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] extract(EXTR_REFS) and pass-by-reference From: helly@php.net (Marcus Boerger) Hello Moriyoshi, Hello Andi Sunday, January 2, 2005, 7:35:05 AM, you wrote: > 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 while i tried to improve performance of the array functions i developed a new pass type - pass as const which doesn't touch the passed variable at all and is compatible with temp vars, too. Maybe your problem here is a reason to really implement that. Andi what do you think? -- Best regards, Marcus mailto:helly@php.net