php-src/Zend/tests/bug72057.phpt
Nikita Nefedov 19759a5602 Fix RECV opcode to handle all kinds of exceptions
fix RECV opcode to handle exceptions thrown from user-defined error handler
as a result Notice error from failed type coercion
2016-04-20 08:40:44 -07:00

22 lines
466 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, Array)
#1 %s(%d): {closure}('7as')
#2 {main}
thrown in %s on line %d