Re: Calling symbol table patch
| From: | Stanislav Malyshev | Date: | Tue, 21 Nov 2000 09:08:44 +0000 |
| Subject: | Re: Calling symbol table patch | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-38768@lists.php.net to get a copy of this message | ||
SH>> I don't think its really a good idea for a function to have
SH>> access to the scope of the function that called it (and be able
SH>> to modify it). That just makes me a little queasy somehow.
SH>> You shouldn't be able to modify and access one functions scope
SH>> from another function.
I think the solution might be adopting something like Perl's scoping -
real local variable (Perl's "my", PHP locals), "propagating" variable,
that is defined in all calling functions (Perl's "local") - I guess this
could be implemented just by joining symbol tables and should not have
speed impact unless you really use it. Thus, you can allow called
functions to access some variables. Only calling them "local" a-la Perl is
not so good, except for "brand recognition" reasons, because they are not
locals. More successful names are welcome.
--
Stanislav Malyshev, Zend Products Engineer
stas@zend.com http://www.zend.com/ +972-3-6139665 ext.106