3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = bin2hex(openssl_random_pseudo_bytes(5)); echo $string;
Output for 7.2.29 - 7.2.33, 7.3.16 - 7.3.33, 7.4.3 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
Fatal error: Uncaught Error: Call to undefined function openssl_random_pseudo_bytes() in /in/N9IQA:2 Stack trace: #0 {main} thrown in /in/N9IQA on line 2
Process exited with code 255.
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 Fatal error: Uncaught Error: Call to undefined function openssl_random_pseudo_bytes() in /in/N9IQA:2 Stack trace: #0 {main} thrown in /in/N9IQA on line 2
Process exited with code 255.
Output for 7.2.0
c2be577f70
Output for 7.1.10
a937052566
Output for 7.1.7
018f199d4c
Output for 7.1.6
a631234111
Output for 7.1.5
d5df5a71cc
Output for 7.1.4
4b591731ae
Output for 7.1.3
1adedd57bf
Output for 7.1.2
8d1b5d7c44
Output for 7.1.1
f275d95245
Output for 7.1.0
d31e4a4042
Output for 7.0.20
472b2fe0e9
Output for 7.0.19
59a92a940d
Output for 7.0.18
625986443c
Output for 7.0.17
727f0a65b0
Output for 7.0.16
8ac2191f36
Output for 7.0.15
71055c5b69
Output for 7.0.14
aa8a63dd18
Output for 7.0.13
567ef715e3
Output for 7.0.12
1ef7e89e1b
Output for 7.0.11
955e463987
Output for 7.0.10
db2b9ccc83
Output for 7.0.9
5761807d32
Output for 7.0.8
ca97772260
Output for 7.0.7
873a5a1685
Output for 7.0.6
ca784f953c
Output for 7.0.5
5017dbe378
Output for 7.0.4
448f6d6fbc
Output for 7.0.3
38490af23e
Output for 7.0.2
e80ec55a01
Output for 7.0.1
1a7ffd3c42
Output for 7.0.0
63f3004122

preferences:
135.47 ms | 401 KiB | 170 Q