xref: /PHP-8.4/Zend/tests/bug75290.phpt (revision 08b2ab22)
1--TEST--
2Bug #75290 (debug info of Closures of internal functions contain garbage argument names)
3--FILE--
4<?php
5
6var_dump((new ReflectionFunction('sin'))->getClosure());
7
8var_dump(function ($someThing) {});
9
10?>
11--EXPECTF--
12object(Closure)#%d (2) {
13  ["function"]=>
14  string(3) "sin"
15  ["parameter"]=>
16  array(1) {
17    ["$num"]=>
18    string(10) "<required>"
19  }
20}
21object(Closure)#%d (4) {
22  ["name"]=>
23  string(%d) "{closure:%s:%d}"
24  ["file"]=>
25  string(%d) "%s"
26  ["line"]=>
27  int(%d)
28  ["parameter"]=>
29  array(1) {
30    ["$someThing"]=>
31    string(10) "<required>"
32  }
33}
34