On Mon, 2014-08-18 at 10:37 +0800, Wei Dai wrote: > Hi, > > Hi, > > > > I'm trying to call a function inside a module, a PHP_FUNCTION. > > > > Other than zend_eval_stringl, what's the direct way to do it? > Please refer to call_user_function and call_user_function_ex.
See also the set of zend_call_method_with_[0-4]_params macros in zend_interfaces.h. Those allow to cache the function pointer (or use the one provided via "f" option by zend_parse_parameters) and therefore saving repeated lookups. But general comment: Do you really want to call a user function? - This might be the case when using callbacks, typically when this question pops up the aim is to call some PHP provided function, then often there is a better C level API ... going via PHP function is cumbersome and "slow". johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php