3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = array(); $i = 0; $start = microtime(true); for($i = 0; $i < 100000; $i++) { if(count($test)) { throw new Exception(); } } $middle = microtime(true); for($i = 0; $i < 100000; $i++) { if (!empty($test)) { throw new Exception(); } } $end = microtime(true); echo ($middle - $start) . chr(10); echo ($end - $middle) . chr(10); ?>

preferences:
38.65 ms | 402 KiB | 5 Q