xref: /PHP-8.0/Zend/tests/bug51394.phpt (revision 7aacc705)
1--TEST--
2Bug #51394 (Error line reported incorrectly if error handler throws an exception)
3--INI--
4error_reporting=-1
5--FILE--
6<?php
7function eh()
8{
9    throw new Exception("error!");
10    return false;
11}
12
13set_error_handler("eh");
14$a = $empty($b);
15?>
16--EXPECTF--
17Fatal error: Uncaught Exception: error! in %sbug51394.php:%d
18Stack trace:
19#0 %s(%d): eh(2, 'Undefined varia...', '%s', %d)
20#1 {main}
21  thrown in %sbug51394.php on line %d
22