3v4l.org

run code in 300+ PHP versions simultaneously
<?php $shortstring='hello'; $longstring='long'; for($run=0;$run<10000;$run++) $longstring.='dsfsda'.rand(1000,2000); $time=microtime(true); for($run=0;$run<100000;$run++) $temp=strlen($shortstring); $time=microtime(true)-$time; echo "strlen on short string took $time seconds\n"; $time=microtime(true); for($run=0;$run<100000;$run++) $temp2=strlen($longstring); $time=microtime(true)-$time; echo "strlen on long string took $time seconds\n";

preferences:
32.53 ms | 402 KiB | 5 Q