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(0)); var_dump(random_bytes(new stdClass()));
based on q33lo
Output for 7.2.0
string(4) ".��" Notice: A non well formed numeric value encountered in /in/QppU7 on line 4 string(4) "<X�d" Fatal error: Uncaught TypeError: random_bytes() expects parameter 1 to be integer, string given in /in/QppU7:5 Stack trace: #0 /in/QppU7(5): random_bytes('d3') #1 {main} thrown in /in/QppU7 on line 5
Process exited with code 255.
Output for 7.1.10
string(4) "Q6G" Notice: A non well formed numeric value encountered in /in/QppU7 on line 4 string(4) "_`�" Fatal error: Uncaught TypeError: random_bytes() expects parameter 1 to be integer, string given in /in/QppU7:5 Stack trace: #0 /in/QppU7(5): random_bytes('d3') #1 {main} thrown in /in/QppU7 on line 5
Process exited with code 255.
Output for 7.1.7
string(4) "�v" Notice: A non well formed numeric value encountered in /in/QppU7 on line 4 string(4) "�K�A" Fatal error: Uncaught TypeError: random_bytes() expects parameter 1 to be integer, string given in /in/QppU7:5 Stack trace: #0 /in/QppU7(5): random_bytes('d3') #1 {main} thrown in /in/QppU7 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/QppU7 on line 4 string(4) "��&�" Fatal error: Uncaught TypeError: random_bytes() expects parameter 1 to be integer, string given in /in/QppU7:5 Stack trace: #0 /in/QppU7(5): random_bytes('d3') #1 {main} thrown in /in/QppU7 on line 5
Process exited with code 255.
Output for 7.1.5
string(4) "�=�K" Notice: A non well formed numeric value encountered in /in/QppU7 on line 4 string(4) "|�!�" Fatal error: Uncaught TypeError: random_bytes() expects parameter 1 to be integer, string given in /in/QppU7:5 Stack trace: #0 /in/QppU7(5): random_bytes('d3') #1 {main} thrown in /in/QppU7 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/QppU7 on line 4 string(4) "9�ʪ" Fatal error: Uncaught TypeError: random_bytes() expects parameter 1 to be integer, string given in /in/QppU7:5 Stack trace: #0 /in/QppU7(5): random_bytes('d3') #1 {main} thrown in /in/QppU7 on line 5
Process exited with code 255.
Output for 7.0.20
string(4) "R�ߌ" Notice: A non well formed numeric value encountered in /in/QppU7 on line 4 string(4) "C�sO" Fatal error: Uncaught TypeError: random_bytes() expects parameter 1 to be integer, string given in /in/QppU7:5 Stack trace: #0 /in/QppU7(5): random_bytes('d3') #1 {main} thrown in /in/QppU7 on line 5
Process exited with code 255.
Output for 7.0.6
string(4) "Z�K" Notice: A non well formed numeric value encountered in /in/QppU7 on line 4 string(4) "q]��" Fatal error: Uncaught TypeError: random_bytes() expects parameter 1 to be integer, string given in /in/QppU7:5 Stack trace: #0 /in/QppU7(5): random_bytes('d3') #1 {main} thrown in /in/QppU7 on line 5
Process exited with code 255.
Output for 7.0.5
string(4) "M���" Notice: A non well formed numeric value encountered in /in/QppU7 on line 4 string(4) "�tɏ" Fatal error: Uncaught TypeError: random_bytes() expects parameter 1 to be integer, string given in /in/QppU7:5 Stack trace: #0 /in/QppU7(5): random_bytes('d3') #1 {main} thrown in /in/QppU7 on line 5
Process exited with code 255.
Output for 7.0.4
string(4) "q��" Notice: A non well formed numeric value encountered in /in/QppU7 on line 4 string(4) "��i�" Fatal error: Uncaught TypeError: random_bytes() expects parameter 1 to be integer, string given in /in/QppU7:5 Stack trace: #0 /in/QppU7(5): random_bytes('d3') #1 {main} thrown in /in/QppU7 on line 5
Process exited with code 255.
Output for 7.0.3
string(4) "G��" Notice: A non well formed numeric value encountered in /in/QppU7 on line 4 string(4) "W��$" Fatal error: Uncaught TypeError: random_bytes() expects parameter 1 to be integer, string given in /in/QppU7:5 Stack trace: #0 /in/QppU7(5): random_bytes('d3') #1 {main} thrown in /in/QppU7 on line 5
Process exited with code 255.
Output for 7.0.2
string(4) "M�/�" Notice: A non well formed numeric value encountered in /in/QppU7 on line 4 string(4) "���" Fatal error: Uncaught TypeError: random_bytes() expects parameter 1 to be integer, string given in /in/QppU7:5 Stack trace: #0 /in/QppU7(5): random_bytes('d3') #1 {main} thrown in /in/QppU7 on line 5
Process exited with code 255.
Output for 7.0.1
string(4) "d�P" Notice: A non well formed numeric value encountered in /in/QppU7 on line 4 string(4) "C]�" Fatal error: Uncaught TypeError: random_bytes() expects parameter 1 to be integer, string given in /in/QppU7:5 Stack trace: #0 /in/QppU7(5): random_bytes('d3') #1 {main} thrown in /in/QppU7 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/QppU7 on line 4 string(4) "�v�{" Fatal error: Uncaught TypeError: random_bytes() expects parameter 1 to be integer, string given in /in/QppU7:5 Stack trace: #0 /in/QppU7(5): random_bytes('d3') #1 {main} thrown in /in/QppU7 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/QppU7 on line 3
Process exited with code 255.