bug28377.phpt 481 B

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