Re: [PHP-DEV] Calling symbol table patch From: Sterling Hughes (Sterling.Hughes <email protected>)
Date: 11/20/00

At 11:00 PM 11/20/2000 +0200, Andi Gutmans wrote:
>At 10:56 PM 11/20/00 +0200, Andi Gutmans wrote:
>
>>Hmm I thought it did so :) I was against making it modifiable but it's OK
>>to create a copy and it would solve Andrei's problem. zval_copy_ctor()
>>would do.
>
>Before I go to bed :)
>I think probably an acceptable solution is to have another function like
>get_local_vars_and_values() (we can think of a cooler name) which gives
>you a copy of the local symbol table which you could then pass on to a
>function.
>As Zeev says it needs to be R/O and there might be issues with it still
>(references and so on).
>I don't like it too much but if there's a decent patch which makes sense
>it should be OK. I'm not sure it's that easy to do in a decent fashion.
>Are you sure it's needed? :)

I think a modification of get_defined_vars() is really all that is
necessary, it returns the current scope, all that needs to be done is to
make it return an associative array with varname and value.

-Sterling

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>