phpinternalsbook/PHP-Internals-Book

Mention that zend_set_user_opcode_handler must be called on MINIT phase

Opened this issue · 0 comments

smola commented

In the Replacing Opcode Handlers, the example calls zend_set_user_opcode_handler from the PHP_MINIT_FUNCTION.

As far as I can tell, this is actually required and calling it during the script execution (e.g. from a PHP function) will not work as expected. If someone can confirm that's the case, I can contribute the PR if needed.