3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function quickRandom($length = 16) { $length = intval($length, 10); $pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; $pool_length = 62; $output = ''; while($length--) { $output .= $pool[rand(0,$pool_length - 1)]; } return $output; } echo strlen(quickRandom(311));
Output for 4.3.0 - 7.1.0
311