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.3.1
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 int, 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.3.0
string(4) "x��" Notice: A non well formed numeric value encountered in /in/QppU7 on line 4 string(4) "L�" Fatal error: Uncaught TypeError: random_bytes() expects parameter 1 to be int, 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.2.13
string(4) "$@Y�" Notice: A non well formed numeric value encountered in /in/QppU7 on line 4 string(4) "wOe" 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.2.12
string(4) "`�" Notice: A non well formed numeric value encountered in /in/QppU7 on line 4 string(4) "��H�" 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.2.11
string(4) "�WX=" Notice: A non well formed numeric value encountered in /in/QppU7 on line 4 string(4) "M�7" 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.2.10
string(4) "<r4b" 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.2.9
string(4) "�0��" 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.2.8
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.2.7
string(4) "dڂ" Notice: A non well formed numeric value encountered in /in/QppU7 on line 4 string(4) "�2[�" 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.2.6
string(4) "E �" Notice: A non well formed numeric value encountered in /in/QppU7 on line 4 string(4) "[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.2.5
string(4) "n<_" 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.2.4
string(4) "K&X�" Notice: A non well formed numeric value encountered in /in/QppU7 on line 4 string(4) ".!CM" 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.2.3
string(4) ":�I-" Notice: A non well formed numeric value encountered in /in/QppU7 on line 4 string(4) "��m&" 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.2.2
string(4) "Ц8�" 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.2.1
string(4) "�O�" Notice: A non well formed numeric value encountered in /in/QppU7 on line 4 string(4) "� O)" 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.2.0
string(4) "֭�!" Notice: A non well formed numeric value encountered in /in/QppU7 on line 4 string(4) "*�z@" 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.25
string(4) ":V+�" 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.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.