3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump(random_bytes('4')); var_dump(random_bytes('4d')); var_dump(random_bytes('d3')); var_dump(random_bytes(new stdClass()));
based on W3OpZ
Output for 7.2.0
string(4) "͹w" Notice: A non well formed numeric value encountered in /in/q33lo on line 4 string(4) "Z��" Fatal error: Uncaught TypeError: random_bytes() expects parameter 1 to be integer, string given in /in/q33lo:5 Stack trace: #0 /in/q33lo(5): random_bytes('d3') #1 {main} thrown in /in/q33lo on line 5
Process exited with code 255.
Output for 7.1.10
string(4) "IO��" Notice: A non well formed numeric value encountered in /in/q33lo on line 4 string(4) "Z�Tt" Fatal error: Uncaught TypeError: random_bytes() expects parameter 1 to be integer, string given in /in/q33lo:5 Stack trace: #0 /in/q33lo(5): random_bytes('d3') #1 {main} thrown in /in/q33lo on line 5
Process exited with code 255.
Output for 7.1.7
string(4) "�*" Notice: A non well formed numeric value encountered in /in/q33lo on line 4 string(4) "�1" Fatal error: Uncaught TypeError: random_bytes() expects parameter 1 to be integer, string given in /in/q33lo:5 Stack trace: #0 /in/q33lo(5): random_bytes('d3') #1 {main} thrown in /in/q33lo on line 5
Process exited with code 255.
Output for 7.1.6
string(4) "���" Notice: A non well formed numeric value encountered in /in/q33lo on line 4 string(4) ",?_|" Fatal error: Uncaught TypeError: random_bytes() expects parameter 1 to be integer, string given in /in/q33lo:5 Stack trace: #0 /in/q33lo(5): random_bytes('d3') #1 {main} thrown in /in/q33lo on line 5
Process exited with code 255.
Output for 7.1.5
string(4) "F^7�" Notice: A non well formed numeric value encountered in /in/q33lo on line 4 string(4) "Y�a�" Fatal error: Uncaught TypeError: random_bytes() expects parameter 1 to be integer, string given in /in/q33lo:5 Stack trace: #0 /in/q33lo(5): random_bytes('d3') #1 {main} thrown in /in/q33lo on line 5
Process exited with code 255.
Output for 7.1.0
string(4) "�Ľ�" Notice: A non well formed numeric value encountered in /in/q33lo on line 4 string(4) "}Íi" Fatal error: Uncaught TypeError: random_bytes() expects parameter 1 to be integer, string given in /in/q33lo:5 Stack trace: #0 /in/q33lo(5): random_bytes('d3') #1 {main} thrown in /in/q33lo on line 5
Process exited with code 255.
Output for 7.0.20
string(4) "�l�P" Notice: A non well formed numeric value encountered in /in/q33lo on line 4 string(4) "c+�?" Fatal error: Uncaught TypeError: random_bytes() expects parameter 1 to be integer, string given in /in/q33lo:5 Stack trace: #0 /in/q33lo(5): random_bytes('d3') #1 {main} thrown in /in/q33lo on line 5
Process exited with code 255.
Output for 7.0.6
string(4) "Aߠ" Notice: A non well formed numeric value encountered in /in/q33lo on line 4 string(4) "��a�" Fatal error: Uncaught TypeError: random_bytes() expects parameter 1 to be integer, string given in /in/q33lo:5 Stack trace: #0 /in/q33lo(5): random_bytes('d3') #1 {main} thrown in /in/q33lo on line 5
Process exited with code 255.
Output for 7.0.5
string(4) "j�o�" Notice: A non well formed numeric value encountered in /in/q33lo on line 4 string(4) "ֽ<\" Fatal error: Uncaught TypeError: random_bytes() expects parameter 1 to be integer, string given in /in/q33lo:5 Stack trace: #0 /in/q33lo(5): random_bytes('d3') #1 {main} thrown in /in/q33lo on line 5
Process exited with code 255.
Output for 7.0.4
string(4) "���T" Notice: A non well formed numeric value encountered in /in/q33lo on line 4 string(4) "�l�p" Fatal error: Uncaught TypeError: random_bytes() expects parameter 1 to be integer, string given in /in/q33lo:5 Stack trace: #0 /in/q33lo(5): random_bytes('d3') #1 {main} thrown in /in/q33lo on line 5
Process exited with code 255.
Output for 7.0.3
string(4) "���R" Notice: A non well formed numeric value encountered in /in/q33lo on line 4 string(4) "4��" Fatal error: Uncaught TypeError: random_bytes() expects parameter 1 to be integer, string given in /in/q33lo:5 Stack trace: #0 /in/q33lo(5): random_bytes('d3') #1 {main} thrown in /in/q33lo on line 5
Process exited with code 255.
Output for 7.0.2
string(4) "×F�" Notice: A non well formed numeric value encountered in /in/q33lo on line 4 string(4) "�S�T" Fatal error: Uncaught TypeError: random_bytes() expects parameter 1 to be integer, string given in /in/q33lo:5 Stack trace: #0 /in/q33lo(5): random_bytes('d3') #1 {main} thrown in /in/q33lo on line 5
Process exited with code 255.
Output for 7.0.1
string(4) "����" Notice: A non well formed numeric value encountered in /in/q33lo on line 4 string(4) "oZ:�" Fatal error: Uncaught TypeError: random_bytes() expects parameter 1 to be integer, string given in /in/q33lo:5 Stack trace: #0 /in/q33lo(5): random_bytes('d3') #1 {main} thrown in /in/q33lo on line 5
Process exited with code 255.
Output for 7.0.0
string(4) "�P<�" Notice: A non well formed numeric value encountered in /in/q33lo on line 4 string(4) "4" Fatal error: Uncaught TypeError: random_bytes() expects parameter 1 to be integer, string given in /in/q33lo:5 Stack trace: #0 /in/q33lo(5): random_bytes('d3') #1 {main} thrown in /in/q33lo on line 5
Process exited with code 255.
Output for 5.3.18 - 5.6.28
Fatal error: Call to undefined function random_bytes() in /in/q33lo on line 3
Process exited with code 255.