PATH:
opt
/
alt
/
tests
/
alt-php85-pecl-xhprof-tideways_5.0.4-2.el8
/
tests
--TEST-- Tideways: Test (direct and indirect) recursive function calls. --FILE-- <?php include_once dirname(__FILE__).'/common.php'; // dummy wrapper to test indirect recursion function bar($depth, $use_direct_recursion) { foo($depth, $use_direct_recursion); } function foo($depth, $use_direct_recursion = false) { if ($depth > 0) { if ($use_direct_recursion) foo($depth - 1, $use_direct_recursion); else bar($depth - 1, $use_direct_recursion); } } tideways_xhprof_enable(); foo(4, true); $output = tideways_xhprof_disable(); echo "Direct Recursion\n"; print_canonical($output); echo "\n"; tideways_xhprof_enable(); foo(4, false); $output = tideways_xhprof_disable(); echo "Indirect Recursion\n"; print_canonical($output); echo "\n"; ?> --EXPECT-- Direct Recursion foo : ct= 1; wt=*; foo==>foo@1 : ct= 1; wt=*; foo@1==>foo@2 : ct= 1; wt=*; foo@2==>foo@3 : ct= 1; wt=*; foo@3==>foo@4 : ct= 1; wt=*; main() : ct= 1; wt=*; tideways_xhprof_disable : ct= 1; wt=*; tideways_xhprof_disable==>tideways_xhprof_disable@1: ct= 1; wt=*; Indirect Recursion bar==>foo@1 : ct= 1; wt=*; bar@1==>foo@2 : ct= 1; wt=*; bar@2==>foo@3 : ct= 1; wt=*; bar@3==>foo@4 : ct= 1; wt=*; foo : ct= 1; wt=*; foo==>bar : ct= 1; wt=*; foo@1==>bar@1 : ct= 1; wt=*; foo@2==>bar@2 : ct= 1; wt=*; foo@3==>bar@3 : ct= 1; wt=*; main() : ct= 1; wt=*; tideways_xhprof_disable : ct= 1; wt=*; tideways_xhprof_disable==>tideways_xhprof_disable@1: ct= 1; wt=*;
[-] xhprof_006.phpt.php82-tests-fix
[edit]
[-] xhprof_001.phpt
[edit]
[-] xhprof_007.phpt.php84-tests-fix
[edit]
[-] xhprof_004.phpt
[edit]
[-] xhprof_002.phpt.php82-tests-fix
[edit]
[-] xhprof_008.phpt.php82-tests-fix
[edit]
[-] xhprof_003.phpt.php82-tests-fix
[edit]
[-] xhprof_002.phpt
[edit]
[-] xhprof_008.phpt
[edit]
[-] xhprof_004.phpt.php84-tests-fix
[edit]
[-] xhprof_005.phpt
[edit]
[+]
..
[-] xhprof_007.phpt
[edit]
[-] xhprof_003.phpt
[edit]
[-] common.php
[edit]
[-] xhprof_008.inc
[edit]
[-] xhprof_004.phpt.php82-tests-fix
[edit]
[-] xhprof_007.phpt.php82-tests-fix
[edit]
[-] xhprof_001.phpt.php82-tests-fix
[edit]
[-] xhprof_006.phpt
[edit]