We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What was fixed 3301d96 #13446 (comment) bc it was broken from 8.3.0-8.3.4 is still broken if the exception handler itself calls exit.
https://3v4l.org/HkWfh without exit: https://3v4l.org/FTWQf
The following code:
<?php declare(strict_types=1); function foo($e) { var_dump( set_exception_handler('foo') ); restore_exception_handler(); echo "---" . PHP_EOL; exit; } set_exception_handler('foo'); register_shutdown_function(function () { var_dump( set_exception_handler(null) ); }); strlen(null);
Resulted in this output:
NULL --- NULL
But I expected this output instead:
NULL --- string(3) "foo"
This matters, because since PHP 8.3, the exit code of the exit() call in exception handler is used as exit code of PHP
@iluuu1994
PHP 8.3.0+
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
What was fixed 3301d96 #13446 (comment) bc it was broken from 8.3.0-8.3.4 is still broken if the exception handler itself calls exit.
https://3v4l.org/HkWfh
without exit: https://3v4l.org/FTWQf
The following code:
Resulted in this output:
But I expected this output instead:
This matters, because since PHP 8.3, the exit code of the exit() call in exception handler is used as exit code of PHP
@iluuu1994
PHP Version
Operating System
No response
The text was updated successfully, but these errors were encountered: