CakeFest 2024: The Official CakePHP Conference

xhprof_sample_disable

(PECL xhprof >= 0.9.0)

xhprof_sample_disable停止 xhprof 性能采样分析器

说明

xhprof_sample_disable(): array

停止采样模式的 xhprof 分析器。

参数

此函数没有参数。

返回值

本次运行的xhprof采样数据,array 类型。

示例

示例 #1 xhprof_sample_disable() 范例

<?php
xhprof_sample_enable
();

for (
$i = 0; $i <= 10000; $i++) {
$a = strlen($i);
$b = $i * $a;
$c = rand();
}

$xhprof_data = xhprof_sample_disable();

print_r($xhprof_data);
?>

以上示例的输出类似于:

Array
(
    [1272935300.800000] => main()
    [1272935300.900000] => main()
)
add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top