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