Re: [PHP-DEV] Re: intercepting function calls

2005-02-11 Thread Andi Gutmans
OK you got a point. It doesn't really hurt to keep it so I'll leave it all in. I can think of cases where using those opcodes might be easier to use at runtime than overloading zend_execute. Andi At 09:09 AM 2/11/2005 +0100, Derick Rethans wrote: On Thu, 10 Feb 2005, Andi Gutmans wrote: > At 11:

Re: [PHP-DEV] Re: intercepting function calls

2005-02-11 Thread George Schlossnagle
On Feb 11, 2005, at 3:09 AM, Derick Rethans wrote: ; I really need the statement call callback for single stepping through code. Seconded. I use something similar. The statement call is really useful. The fcall_(begin|end) hooks I never use though. George -- PHP Internals - PHP Runtime Develo

Re: [PHP-DEV] Re: intercepting function calls

2005-02-11 Thread Derick Rethans
On Thu, 10 Feb 2005, Andi Gutmans wrote: > At 11:01 AM 2/9/2005 -0500, George Schlossnagle 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/afte

Re: [PHP-DEV] Re: intercepting function calls

2005-02-10 Thread Andi Gutmans
At 11:01 AM 2/9/2005 -0500, George Schlossnagle 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

Re: [PHP-DEV] Re: intercepting function calls

2005-02-09 Thread Derick Rethans
On Wed, 9 Feb 2005 [EMAIL PROTECTED] wrote: > 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 sin

Re: [PHP-DEV] Re: intercepting function calls

2005-02-09 Thread sumoraigabe-php
--- 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

Re: [PHP-DEV] Re: intercepting function calls

2005-02-09 Thread Sebastian Bergmann
Sara Golemon wrote: > 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_hand

Re: [PHP-DEV] Re: intercepting function calls

2005-02-09 Thread Sara Golemon
>> 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; >> ..

Re: [PHP-DEV] Re: intercepting function calls

2005-02-09 Thread George Schlossnagle
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/ze