--- George Schlossnagle <[EMAIL PROTECTED]> wrote: > > On Feb 9, 2005, at 10:57 AM, Sara Golemon wrote: > > >> 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: > > You can also do this by directly wrapping > zend_execute. This is the > preferred method if you're writing a profiler or > such. > > George
Thanks, to both of you. I'm mostly just curious, but I may actually create an extension to provide user space ability to intercept function/method calls and execute code before / after them. I made a comment about the Aspect Oriented PHP article on /. back in January that it'd be better to implement that type of call interception within PHP itself, not using some kind of preprocessor. The damn idea's been stuck in my brain ever since. So, just to be clear... Will using call_user_function() either from the hooks or a zend_execute() wrapper cause any problems in the zend engine? - Gabriel ===== -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php