3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo srand(hash('sha256', getmypid()));
Output for 8.3.0 - 8.3.4, 8.3.6
Fatal error: Uncaught TypeError: srand(): Argument #1 ($seed) must be of type ?int, string given in /in/RboJv:3 Stack trace: #0 /in/RboJv(3): srand('d4735e3a265e16e...') #1 {main} thrown in /in/RboJv on line 3
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 TypeError: srand(): Argument #1 ($seed) must be of type ?int, string given in /in/RboJv:3 Stack trace: #0 /in/RboJv(3): srand('d4735e3a265e16e...') #1 {main} thrown in /in/RboJv on line 3
Process exited with code 255.
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18
Fatal error: Uncaught TypeError: srand(): Argument #1 ($seed) must be of type int, string given in /in/RboJv:3 Stack trace: #0 /in/RboJv(3): srand('d4735e3a265e16e...') #1 {main} thrown in /in/RboJv on line 3
Process exited with code 255.
Output for 7.3.3, 7.3.5 - 7.3.7, 7.3.10 - 7.3.33, 7.4.3 - 7.4.33
Warning: srand() expects parameter 1 to be int, string given in /in/RboJv on line 3
Output for 5.5.31 - 5.5.33, 5.5.35, 5.6.10 - 5.6.12, 5.6.15 - 5.6.17, 5.6.20 - 5.6.21, 7.0.0 - 7.0.3, 7.0.5, 7.0.20, 7.1.0, 7.1.6, 7.1.27 - 7.1.33, 7.2.0 - 7.2.2, 7.2.4 - 7.2.5, 7.2.7 - 7.2.11, 7.2.17 - 7.2.20, 7.2.22 - 7.2.23, 7.2.25, 7.3.1 - 7.3.2, 7.3.4, 7.3.8 - 7.3.9, 7.4.0
Notice: A non well formed numeric value encountered in /in/RboJv on line 3
Output for 7.3.0
Notice: A non well formed numeric value encountered in /in/RboJv on line 3 Warning: srand() expects parameter 1 to be int, string given in /in/RboJv on line 3
Output for 7.0.4, 7.0.6, 7.1.5, 7.1.7 - 7.1.26, 7.2.3, 7.2.6, 7.2.12 - 7.2.13, 7.2.21, 7.2.24, 7.2.29 - 7.2.33
Warning: srand() expects parameter 1 to be integer, string given in /in/RboJv on line 3
Output for 5.5.24 - 5.5.30, 5.5.34, 5.6.8 - 5.6.9, 5.6.13 - 5.6.14, 5.6.18 - 5.6.19
Warning: srand() expects parameter 1 to be long, string given in /in/RboJv on line 3

preferences:
156.73 ms | 402 KiB | 225 Q