xref: /PHP-8.0/Zend/tests/bug76025.phpt (revision f8d79582)
1--TEST--
2Bug #76025 (Segfault while throwing exception in error_handler)
3--FILE--
4<?php
5
6function handleError($errno, $errstr, $errfile, $errline) {
7    $exception = new exception("blah");
8    throw $exception;
9}
10set_error_handler('handleError', E_ALL);
11$c = $b[$a];
12?>
13--EXPECTF--
14Fatal error: Uncaught Exception: blah in %sbug76025.php:%d
15Stack trace:
16#0 %s(%d): handleError(2, 'Undefined varia...', '%s', %d)
17#1 {main}
18  thrown in %sbug76025.php on line %d
19