(PECL xhprof >= 0.9.0)
xhprof_sample_disable — Stoppe le profilage xhprof sur échantillon
Stoppe le profilage xhprof sur échantillon et retourne les informations de profilage.
Cette fonction ne contient aucun paramètre.
Un tableau de données de l'échantillon xhprof, issues de son exécution.
Retourne null
si le profilage n’est pas activé.
Exemple #1 Exemple avec 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);
?>
Résultat de l'exemple ci-dessus est similaire à :
Array ( [1272935300.800000] => main() [1272935300.900000] => main() )