Re: Request For Comments: A $CURRENT array
| From: | Stanislav Malyshev | Date: | Wed, 06 Sep 2000 09:55:00 +0000 |
| Subject: | Re: Request For Comments: A $CURRENT array | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-32333@lists.php.net to get a copy of this message | ||
SH>> Right now PHP has the $GLOBALS variable, a variable that
SH>> contains all of entries in the EG(symbol_table), or all
SH>> variables that are in the global scope. I'm proposing a $CURRENT
SH>> variable, a variable that contains all of the entries in the
SH>> EG(active_symbol_table), or all variables that are in the
SH>> current scope. Take the following example:
This sounds nice. Only concern is that if you do it for each op_array,
you'll get a speed hit (there's a lot of op_arrays in average PHP
applications, tens to hundreds of them).
SH>> Concessions
SH>> Since the $CURRENT array will contain a reference to itself,
SH>> functions like var_dump() will go through it recursively just
SH>> like with the $GLOBALS array.
Well, this var_dump should be fixed anyway... They only problem that I
have now is a format how to represent it.
--
Stanislav Malyshev stas@zend.com http://www.zend.com/
+972-3-6139665 ext.106