Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:14598 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 67128 invoked by uid 1010); 3 Feb 2005 22:12:08 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 67113 invoked by uid 1007); 3 Feb 2005 22:12:08 -0000 Message-ID: <20050203221208.67112.qmail@lists.php.net> To: internals@lists.php.net Date: Thu, 03 Feb 2005 23:12:04 +0100 User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 References: <20050128223155.81436.qmail@lists.php.net> <5.1.0.14.2.20050128145327.04025190@localhost> <20050128233054.9657.qmail@lists.php.net> <20050128234649.27693.qmail@lists.php.net> <20050128235345.42569.qmail@lists.php.net> <20050130193103.63809.qmail@lists.php.net> <20050131182732.84357.qmail@lists.php.net> <20050131211614.84286.qmail@lists.php.net> <20050131222442.61678.qmail@lists.php.net> In-Reply-To: <20050131222442.61678.qmail@lists.php.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 62.226.9.103 Subject: Re: referencing Superglobals with variable variables inside functions From: michael.virnstein@brodos.de (Michael Virnstein) Sara Golemon wrote: > Index: Zend/zend_execute.c > =================================================================== > RCS file: /repository/ZendEngine2/zend_execute.c,v > retrieving revision 1.692 > diff -u -r1.692 zend_execute.c > --- Zend/zend_execute.c 22 Jan 2005 02:29:18 -0000 1.692 > +++ Zend/zend_execute.c 31 Jan 2005 22:13:50 -0000 > @@ -1001,6 +1001,10 @@ > { > switch (opline->op2.u.EA.type) { > case ZEND_FETCH_LOCAL: > + if (zend_hash_exists(CG(auto_globals), > variable->value.str.val, variable->value.str.len + 1)) { > + /* Dynamically resolved auto global */ > + return &EG(symbol_table); > + } > return EG(active_symbol_table); > break; > case ZEND_FETCH_GLOBAL: i must admit, that i don't know very much about the zend engine and the php core in general, but if "opline->op2.u.EA.type" "knows" if the variable is a local one, a global one or a static one, why hasn't it the value of ZEND_FETCH_GLOBAL for superglobals in the first place? Michael