OwlCyberSecurity - MANAGER
Edit File: xhprof_007.phpt
--TEST-- Tideways: call_user_func_array --FILE-- <?php include_once dirname(__FILE__).'/common.php'; function foo ($x) { return $x * $x; } $counter = new class { public function __invoke ($x) { return $x * $x; } }; tideways_xhprof_enable(); call_user_func("foo", 2); call_user_func_array("foo", [2]); call_user_func_array(function ($x) { return $x * $x; }, [2]); call_user_func_array($counter, [2]); $output = tideways_xhprof_disable(); print_canonical($output); --EXPECTF-- call_user_func : ct= 1; wt=*; call_user_func==>call_user_func@1 : ct= 1; wt=*; call_user_func@1==>foo : ct= 1; wt=*; call_user_func_array : ct= 3; wt=*; call_user_func_array==>call_user_func_array@1: ct= 3; wt=*; call_user_func_array@1==>class@anonymous::__invoke: ct= 1; wt=*; call_user_func_array@1==>foo : ct= 1; wt=*; call_user_func_array@1==>{closure} : ct= 1; wt=*; main() : ct= 1; wt=*; tideways_xhprof_disable : ct= 1; wt=*; tideways_xhprof_disable==>tideways_xhprof_disable@1: ct= 1; wt=*;