3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php  function password_generate($chars)   {    $data = '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcefghijklmnopqrstuvwxyz';    return substr(str_shuffle($data), 0, $chars);  }    echo password_generate(7);  ?>  
Output for 5.4.0 - 5.4.32
<?php  function password_generate($chars)   {    $data = '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcefghijklmnopqrstuvwxyz';    return substr(str_shuffle($data), 0, $chars);  }    echo password_generate(7);  ?>