The behaviour of these functions is affected by settings in php.ini.
Here's a short explanation of the configuration directives.
mysqlnd_uh.enable
Enables or disables the plugin. If set to disabled, the extension will not allow users to plug into mysqlnd to hook mysqlnd calls.
mysqlnd_uh.report_wrong_types
Whether to report wrong return value types of user hooks as E_WARNING level errors. This is recommended for detecting errors.
E_WARNING