void (*old_execute)(zend_op_array *op_array TSRMLS_DC);
void xdebug_execute(zend_op_array *op_array TSRMLS_DC);
PHP_MINIT_FUNCTION(xdebug) {
old_execute = zend_execute;
zend_execute = xdebug_execute;
return SUCCESS;
}
PHP_MSHUTDOWN_FUNCTION(xdebug) {
zend_execute = old_execute;
return SUCCESS;
}
void xdebug_execute(zend_op_array *op_array TSRMLS_DC)
{
printf ("Executing in file %s\n", op_array->filename);
old_execute (op_array TSRMLS_CC);
}