Re: Calling symbol table patch
| From: | Zeev Suraski | Date: | Mon, 20 Nov 2000 21:25:58 +0000 |
| Subject: | Re: Calling symbol table patch | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-38693@lists.php.net to get a copy of this message | ||
At 23:16 20/11/2000, Andrei Zmievski wrote:
On Mon, 20 Nov 2000, 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. Well, I hate to be a stinker, but it doesn't really solve my problem. I'd have to type, assign(get_defined_vars(), 'var1', 'var2') each time. Hardly convenient.But much more correct. Giving access to the calling function symbol table, without the calling function explicitly 'giving permission' to do it (in the form of passing its symbol table as an argument), breaks a fundamental rule of scope in structured programming... We all know that there are some cases in which a specialized function would be a serious shortcut, but would be the wrong thing to do. I think that's such a case. Zeev