3v4l.org

run code in 300+ PHP versions simultaneously
<?php function randomString() { $str = ''; $alpha = range('a', 'f'); $alphaCount = rand(25, 26); for ($i = 0; $i < $alphaCount; $i++) { $str .= $alpha[array_rand($alpha)]; } $numCount = 64 - $alphaCount; for ($i = 0; $i < $numCount; $i++) { $str .= rand(0, 9); } return str_shuffle($str); } echo randomString();

preferences:
23.29 ms | 407 KiB | 5 Q