xref: /PHP-8.3/Zend/tests/bug28377.phpt (revision 782352c5)
1--TEST--
2Bug #28377 (debug_backtrace is intermittently passing args)
3--FILE--
4<?php
5function doit($a, $b)
6{
7  $trace = debug_backtrace();
8  custom_callback('dereferenced', $trace);
9  custom_callback('direct', debug_backtrace());
10}
11
12function custom_callback($traceName, $btInfo)
13{
14  echo $traceName ." -- args: ";
15  echo isset($btInfo[0]['args']) ? count($btInfo[0]['args']) : 'does not exist';
16  echo "\n";
17}
18
19doit('a','b');
20?>
21--EXPECT--
22dereferenced -- args: 2
23direct -- args: 2
24