Skip to content
This repository was archived by the owner on Oct 6, 2023. It is now read-only.

Commit 0ca7b91

Browse files
committed
Add test for internal functions calling userland functions
1 parent f6aed09 commit 0ca7b91

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

tests/xhprof_008.phpt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
--TEST--
2+
xhprof: internal functions calling userland functions
3+
--FILE--
4+
<?php
5+
6+
include_once dirname(__FILE__).'/common.php';
7+
8+
function double($x) {
9+
return $x * 2;
10+
}
11+
12+
tideways_xhprof_enable();
13+
14+
$doubles = array_map('double', range(1, 10));
15+
16+
$output = tideways_xhprof_disable();
17+
18+
print_canonical($output);
19+
--EXPECTF--
20+
array_map==>double : ct= 10; wt=*;
21+
main() : ct= 1; wt=*;
22+
main()==>array_map : ct= 1; wt=*;
23+
main()==>range : ct= 1; wt=*;
24+
main()==>tideways_xhprof_disable : ct= 1; wt=*;

0 commit comments

Comments
 (0)