3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $n = 12; echo base64_encode(strong_random_bytes(intval(ceil($n * 3 / 4)))); echo substr(str_replace(['/', '+', '='], ['', '', ''], base64_encode(strong_random_bytes($n))), 0, $n);