3v4l.org

run code in 300+ PHP versions simultaneously
<?php function random($length = 8) { return substr(base_convert(bin2hex(openssl_random_pseudo_bytes($length)), 16, 36), 0, $length); } /* function random($length = 8) { return strtr(substr(base64_encode(openssl_random_pseudo_bytes($length)), 0, $length), '/+=', '_-.'); } */ for ($i=1; $i<64; $i++) { $str = random($i); echo "$str\n"; }

preferences:
62.74 ms | 402 KiB | 5 Q