1
0
mirror of https://github.com/php/php-src.git synced 2026-03-30 04:02:19 +02:00
Files
archived-php-src/Zend/tests/bug72057.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

20 lines
457 B
PHP

--TEST--
Bug #72057 (PHP hangs when user error handler throws exception after Notice from type coercion)
--FILE--
<?php
set_error_handler(
function() {
throw new Exception("My custom error");
}
);
(function (int $i) { bar(); })("7as");
--EXPECTF--
Fatal error: Uncaught Exception: My custom error in %s:%d
Stack trace:
#0 %s(%d): {closure}(8, 'A non well form...', '%s', %d)
#1 %s(%d): {closure}('7as')
#2 {main}
thrown in %s on line %d