PHP Conference Japan 2024

xhprof_sample_disable

(PECL xhprof >= 0.9.0)

xhprof_sample_disable停止 xhprof 采样分析器

描述

xhprof_sample_disable(): 数组

停止采样模式 xhprof 分析器,并

参数

此函数没有参数。

返回值

一个包含 xhprof 采样数据的 数组

范例

示例 #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()
)
添加注释

用户贡献的注释

此页面没有用户贡献的注释。
To Top