Can't you just take the body of "create_function" with the syntax of
the patch, and marry those two?

Well, that'd be a bit hard since the whole difference is that create_function is runtime (thus having access to run-time values) while anon-func we are trying to do here is compile-time (at least it makes a lot of sense to do it compile-time). We could of course just leave the scope thing alone and say "want access to other scope? tough luck, use create_function/eval or globals".

How does the current create_function handle this same scope issue?

It doesn't AFAIK :) Since it's a close relative of eval, it can import values of variables by inserting ones into function string, but nothing more (i.e. you couldn't put an object there, and couldn't refer to a variable - only insert it's value).

--
Stanislav Malyshev, Zend Products Engineer
[EMAIL PROTECTED]  http://www.zend.com/

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to