Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Timing script execution at high-precision
$time1 = explode(' ', microtime());
$time1 = $time1[1] . substr($time1[0], 1, -2);
// your code
$time2 = explode(' ', microtime());
$time2 = $time2[1] . substr($time2[0], 1, -2);
var_dump(bcsub($time2, $time1, 6));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.