3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(bin2hex(random_bytes(10)));
Output for 7.2.6
string(20) "ffd6019f224a41c9c7de"
Output for 7.2.5
string(20) "0c47ddb5d9a36d3f29d0"
Output for 7.2.1
string(20) "8e550ddb3e20163aee5a"
Output for 7.2.0
string(20) "07fc9221b69c13580038"
Output for 7.1.20
string(20) "78e8f5cb80c55ba9742d"
Output for 7.1.10
string(20) "90cfa459b8fd4af1d209"
Output for 7.1.7
string(20) "8981c6b4e1680e517500"
Output for 7.1.6
string(20) "0bd87ee0fcd7b2c55ca8"
Output for 7.1.5
string(20) "81e1889dce3044dcf762"
Output for 7.1.0
string(20) "02640b26d514206864f6"
Output for 7.0.20
string(20) "939d225258a45399a5c2"
Output for 7.0.12
string(20) "a8b6f9d2d62e27122d46"
Output for 7.0.11
string(20) "a1d7fb86213870561d11"
Output for 7.0.10
string(20) "6ddeed0eac497459e89b"
Output for 7.0.9
string(20) "d7fe27888f6da7334b31"
Output for 7.0.8
string(20) "6ef40018d3a6a2e34803"
Output for 7.0.7
string(20) "e0305684f5f7b572b695"
Output for 7.0.6
string(20) "3cbb5d31f50d81786376"
Output for 7.0.5
string(20) "a8ecab777db6d1719317"
Output for 7.0.4
string(20) "06f262dd71a0a88d0d07"
Output for 7.0.3
string(20) "b12d571b3f5a678f69cd"
Output for 7.0.2
string(20) "fa38707ed271611d4c59"
Output for 7.0.1
string(20) "8008c0449e07ab567267"
Output for 7.0.0
string(20) "a2160ac4fbf6b140549b"
Output for 5.6.0 - 5.6.27
Fatal error: Call to undefined function random_bytes() in /in/9EVUV on line 4
Process exited with code 255.

preferences:
76.83 ms | 401 KiB | 57 Q