xref: /PHP-8.1/Zend/tests/bug73156.phpt (revision eca84946)
1--TEST--
2Bug #73156 (segfault on undefined function)
3--FILE--
4<?php
5class A {
6    public function __call($name, $args) {
7        eval('$args = array(); var_dump(debug_backtrace());');
8    }
9}
10
11$a = new A();
12
13$a->test("test");
14?>
15--EXPECTF--
16array(2) {
17  [0]=>
18  array(3) {
19    ["file"]=>
20    string(%d) "%sbug73156.php"
21    ["line"]=>
22    int(4)
23    ["function"]=>
24    string(4) "eval"
25  }
26  [1]=>
27  array(7) {
28    ["file"]=>
29    string(%d) "%sbug73156.php"
30    ["line"]=>
31    int(10)
32    ["function"]=>
33    string(6) "__call"
34    ["class"]=>
35    string(1) "A"
36    ["object"]=>
37    object(A)#%d (0) {
38    }
39    ["type"]=>
40    string(2) "->"
41    ["args"]=>
42    array(2) {
43      [0]=>
44      string(4) "test"
45      [1]=>
46      array(0) {
47      }
48    }
49  }
50}
51