3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump(base64_encode(random_bytes(9/2)));
based on p74tT
Output for 7.2.6
string(8) "k9rCSw=="
Output for 7.2.0
string(8) "TaWYsw=="
Output for 7.1.20
string(8) "KV2HxA=="
Output for 7.1.10
string(8) "tF0xtw=="
Output for 7.1.7
string(8) "H4kJEA=="
Output for 7.1.6
string(8) "Pf09Tg=="
Output for 7.1.5
string(8) "2tClcg=="
Output for 7.1.0
string(8) "yjGhpA=="
Output for 7.0.20
string(8) "yyB2Ow=="
Output for 7.0.6
string(8) "mSXfyA=="
Output for 7.0.5
string(8) "Tzp6Wg=="
Output for 7.0.4
string(8) "Wq9Qcw=="
Output for 7.0.3
string(8) "Xt+DZw=="
Output for 7.0.2
string(8) "OM7gzA=="
Output for 7.0.1
string(8) "SmBqcQ=="
Output for 7.0.0
string(8) "ZM68yg=="
Output for 5.3.20 - 5.6.28
Fatal error: Call to undefined function random_bytes() in /in/uajOd on line 2
Process exited with code 255.