> Is it possible to intercept a function call (user
> space or built-in) in the Zend Engine and execute user
> space code before/after the function call?
>
Yes, you can do this by way of a Zend extension (not a PHP extension mind 
you).

The parts of Zend/zend_extensions.h you'll want to pay attention to are:

typedef void (*fcall_begin_handler_func_t)(zend_op_array *op_array);
typedef void (*fcall_end_handler_func_t)(zend_op_array *op_array);

struct _zend_extension {
    ...
    fcall_begin_handler_func_t fcall_begin_handler;
    fcall_end_handler_func_t fcall_end_handler;
    ...
};

-Sara 

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

Reply via email to