RE: [PHP-DEV] Doing something with an each opcode as zend_execute() handles it
[email protected] ("John Coggeshall") Wed, 5 Mar 2003 18:18:25 -0500
| Newsgroups | php.dev |
|---|---|
| Message-ID | <000601c2e36d$8645b190$6401a8c0@cooglewin> |
>Such as overriding the opcode handlers for each opcode? I
>suppose I could change what the handlers are initialized to in
>zend_init_opcodes_handler() so that my new handler does the
>serialization and then calls the regular handler. Does that make sense?
Yep
Int my_do_fetch_r_handler(ZEND_OPCODE_HANDLER_ARGS) {
fprintf(stderr, "we hooked fetch_r\n");
return
zend_do_fetch_r_handler(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
Is all you'd need.
John