3v4l.org

run code in 300+ PHP versions simultaneously
<?php function doNothing() {} $start = microtime(); for ($i=0;$i<1000;$i++) { doNothing(); } $end = microtime(); $start = explode(' ', $start); $start = $start[0] + ($start[1] - 1378586325); $end = explode(' ', $end); $end = $end[0] + ($end[1] - 1378586325); echo sprintf('%F', $end) . ' - ' . sprintf('%F', $start) . ' = ' . sprintf('%F', $end - $start); $start = microtime(true); for ($i=0;$i<1000;$i++) { doNothing(); } $end = microtime(true); echo sprintf('%F', $end) . ' - ' . sprintf('%F', $start) . ' = ' . sprintf('%F', $end - $start);

preferences:
32.31 ms | 402 KiB | 5 Q