3v4l.org

run code in 300+ PHP versions simultaneously
<?php $timeStart = microtime(true); $rand = substr(str_shuffle('a-Z strings'), 5, 5); $timeEnd = microtime(true); $time = $timeEnd - $timeStart; echo "Code 1: $time seconds\n"; $timeStart = microtime(true); for ($i = 0; $i <= 5; ++$i) { $rand .= chr(rand(99, 155)); } $timeEnd = microtime(true); $time = $timeEnd - $timeStart; echo "Code 2: $time seconds\n";

preferences:
25.71 ms | 412 KiB | 6 Q