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 5.0.4 - 7.1.0
Notice: Undefined variable: nps in /in/QMOti on line 12
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: nps in /in/QMOti on line 12