3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function password($len = 12) { $chars = 'abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ23456789'; $len = strlen($chars); $multiplier = floor(256 / $len); $byte = ord(openssl_random_pseudo_bytes(1)[0]); return $byte; } echo password();
Output for 7.1.7
235