1
0
mirror of https://github.com/php/php-src.git synced 2026-03-30 12:13:02 +02:00
Files
archived-php-src/Zend/tests/bug35017.phpt
Nikita Popov 2f1f34952e Remove $errcontext argument to error handlers
I'm removing the argument entirely here, but we might want to change
this to passing null or and empty array instead, if the impact of
dropping it entirely turns out to be too large.

This was deprecated as part of https://wiki.php.net/rfc/deprecations_php_7_2
as a doc-only deprecation.
2019-02-05 14:12:10 +01:00

22 lines
426 B
PHP

--TEST--
Bug #35017 (Exception thrown in error handler may cause unexpected behavior)
--FILE--
<?php
set_error_handler('errorHandler');
try {
if ($a) {
echo "1\n";
} else {
echo "0\n";
}
echo "?\n";
} catch(Exception $e) {
echo "This Exception should be caught\n";
}
function errorHandler($errno, $errstr, $errfile, $errline) {
throw new Exception('Some Exception');
}
?>
--EXPECT--
This Exception should be caught