3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; $randomString = ''; for ($i = 0; $i < $length; $i++) { $randomString .= $characters[rand(0, strlen($characters) - 1)]; } echo $randomString;
Output for 5.0.4 - 7.1.0
Notice: Undefined variable: length in /in/AZiJf on line 4
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: length in /in/AZiJf on line 4