xhprof_sample_disable

(PECL xhprof >= 0.9.0)
Stops xhprof sample profiler
array xhprof_sample_disable ( void )

Stops the sample mode xhprof profiler, and

Returns:

An array of xhprof sample data, from the run.

Examples:
xhprof_sample_disable() example
<?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);
?>

The above example will output something similar to:

Array
(
    [1272935300.800000] => main()
    [1272935300.900000] => main()
)
doc_php
2016-02-24 15:54:18
Comments
Leave a Comment

Please login to continue.