3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_time_limit(0); $max = 32; $length = 2; $time_start = getmicrotime(); $charset=sprintf('%s', implode('',array_merge(range('0', '9'))));//,range('A', 'Z')))).'~`!@#$%^&*()-_\/\'";:,.+=<>? '; while ($length < $max + 1) { $time_check = getmicrotime(); $time = $time_check - $time_start; printf("Checking passwords with length: %s\nRuntime: %s seconds\n", $length, $time); for ($i = 0;$i < strlen($charset);$i++) $a[] = $charset{$i}; for ($i = 0, $c = "", $d = "chk(";$i < $length;$i++) { $c.= "foreach(\$a as \$b[$i])"; $d.= "\$b[$i]."; } echo($c . $d . "\"\");"); $length++; } function chk($e){ printf("%s\r", $e); } function getmicrotime() { list($usec, $sec) = explode(" ", microtime()); return ((float)$usec + (float)$sec); } ?>

preferences:
33.31 ms | 402 KiB | 5 Q