In MINIT:
zend_set_user_opcode_handler(ZEND_BEGIN_SILENCE, xdebug_silence_handler);
zend_set_user_opcode_handler(ZEND_END_SILENCE, xdebug_silence_handler);
xdebug_silence_handler:
static int xdebug_silence_handler(ZEND_OPCODE_HANDLER_ARGS)
{
if (XG(do_scream)) {
execute_data->opline++;
return ZEND_USER_OPCODE_CONTINUE;
}
return ZEND_USER_OPCODE_DISPATCH;
}