Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save phannam1412/001888c5fd5d76ccba475dd58e57c127 to your computer and use it in GitHub Desktop.
Save phannam1412/001888c5fd5d76ccba475dd58e57c127 to your computer and use it in GitHub Desktop.
PHP profiling
$start = microtime(true);
$MAX = 1000000;
$arr = [];
for($a=0;$a<$MAX;$a++) $arr[] = rand(0,$MAX);
asort($arr);
print round(microtime(true) - $start,2) . 's' . PHP_EOL;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment