Re: Calling symbol table patch

From: Date: Mon, 20 Nov 2000 20:56:15 +0000
Subject: Re: Calling symbol table patch
References: 1 2 3 4 5 6 7  Groups: php.dev 
Request: Send a blank email to php-dev+get-38686@lists.php.net to get a copy of this message
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

« previous php.dev (#38686) next »