Is there any way (with C coding or otherwise) to implement macros a la 
#define in C for PHP? I need to have something that looks like a function but 
that calls eval in the body, and I need that eval to be executed in the 
calling scope. If that's not possible, would it be OK to do something akin to 
(pseudocode here):

save_current_symbol_table=EG(active_symbol_table);
EG(active_symbol_table) = EG(symbol_table);
ops = compile_string(param)
execute(ops)
EG(active_symbol_table)=save_current_symbol_table;

Thiis wouldn't execute in the calling scope (which looks like it's trapped in 
execute) but the global scope. It'd be a comrpomise but I'd settle for it.

Emile


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to