3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = ''; $hashes = array(); do { $str .= '0'; $hashes[] = crypt($str, '$2y$04$1234567890123456789012') if (count(array_unique($hashes)) === count($hashes)) $allUnique = true; else $allUnique = false; } while($allUnique); echo "Stopped at " . strlen($str) . " characters before truncation was detected...\n\n"; $lst = array_pop($hashes); $stl = array_pop($hashes); echo "$stl\n$lst";
Output for 5.4.0 - 5.4.24
Parse error: syntax error, unexpected 'if' (T_IF) in /in/EJKJJ on line 8
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_IF in /in/EJKJJ on line 8
Process exited with code 255.

preferences:
170.48 ms | 1399 KiB | 61 Q