3v4l.org

run code in 300+ PHP versions simultaneously
<?php function rot13($str) { for ($i = 0,$l = strlen($str);$i<$l;$i++) { $str[$i] = chr(((ord($str[$i])-84)%26)+97); } return $str; } $d = '';$i=$e=0; $start = microtime(1); while($i++ < 500000) $d = str_rot13('rotate 13'); echo microtime(1) - $start; echo "\n"; $d = ''; $start = microtime(1); while($e++ < 500000) $d = rot13('rotate 13'); echo microtime(1) - $start;

preferences:
33.78 ms | 402 KiB | 5 Q