xref: /PHP-8.0/Zend/tests/bug72107.phpt (revision 9975986b)
1--TEST--
2Bug #72107: Segfault when using func_get_args as error handler
3--FILE--
4<?php
5set_error_handler('func_get_args');
6function test($a) {
7    echo $undef;
8}
9try {
10    test(1);
11} catch (\Error $e) {
12    echo $e->getMessage();
13}
14?>
15--EXPECT--
16func_get_args() expects exactly 0 arguments, 4 given
17