3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $bytes = random_bytes(5.5); var_dump(bin2hex($bytes));
Output for 7.2.0
string(10) "46d3df0a45"
Output for 7.1.10
string(10) "0a588a110c"
Output for 7.1.7
string(10) "19058d7238"
Output for 7.1.6
string(10) "08cade2d80"
Output for 7.1.5
string(10) "cf103aa88b"
Output for 7.1.0
string(10) "0fe8da0f18"
Output for 7.0.20
string(10) "c7f41ff120"
Output for 7.0.6
string(10) "df7a5ae9dc"
Output for 7.0.5
string(10) "4ab821872f"
Output for 7.0.4
string(10) "a3e57fa31b"
Output for 7.0.3
string(10) "2f61ae139c"
Output for 7.0.2
string(10) "eab6bf4d70"
Output for 7.0.1
string(10) "ce0ee89130"
Output for 7.0.0
string(10) "8cd0709183"
Output for 5.3.18 - 5.6.28
Fatal error: Call to undefined function random_bytes() in /in/tHQ7C on line 3
Process exited with code 255.