CakeFest 2024: The Official CakePHP Conference

xhprof_sample_disable

(PECL xhprof >= 0.9.0)

xhprof_sample_disablexhprof サンプルプロファイラを終了する

説明

xhprof_sample_disable(): array

サンプルモードの 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()
)
add a note

User Contributed Notes

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