3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function generate_string ($length = 20) { $nps = ""; for($i=0;$i<$length;$i++) { $nps .= chr( (mt_rand(1, 36) <= 26) ? mt_rand(97, 122) : mt_rand(48, 57 )); } return $nps; printf($nps);} ?>
Output for 4.3.0 - 7.1.0