summaryrefslogtreecommitdiff
path: root/Zend/tests/bug72057.phpt
blob: e1a129bbc25993829e739e4e7445ca8c5648dcdc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--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