z-engine icon indicating copy to clipboard operation
z-engine copied to clipboard

[Bug] Do not allow to throw PHP exceptions within FFI Zend callbacks

Open lisachenko opened this issue 4 years ago • 1 comments
trafficstars

As throwing is restricted now in PHP, see https://github.com/php/php-src/pull/6366/commits/327e6c9d37dbb36c4a0097fcaabc9d58ecfe9323, I should either handle all exceptions from hooks internally with try..catch section silencing them or convert them to user fatal error with trigger_error(...,E_USER_ERROR).

Maybe there is some advanced technique to install custom exception handler for this, but I'm not aware about this.

lisachenko avatar Jul 03 '21 13:07 lisachenko

Related to https://github.com/php/php-src/pull/6366

lisachenko avatar Jul 03 '21 13:07 lisachenko