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(0)); var_dump(random_bytes(new stdClass()));
based on QppU7
Output for 7.2.0
string(4) "@�" Notice: A non well formed numeric value encountered in /in/9LeCV on line 4 string(4) "��" Fatal error: Uncaught Error: Length must be greater than 0 in /in/9LeCV:5 Stack trace: #0 /in/9LeCV(5): random_bytes(0) #1 {main} thrown in /in/9LeCV on line 5
Process exited with code 255.
Output for 7.1.10
string(4) "��.�" Notice: A non well formed numeric value encountered in /in/9LeCV on line 4 string(4) "��Z" Fatal error: Uncaught Error: Length must be greater than 0 in /in/9LeCV:5 Stack trace: #0 /in/9LeCV(5): random_bytes(0) #1 {main} thrown in /in/9LeCV on line 5
Process exited with code 255.
Output for 7.1.7
string(4) "H/#�" Notice: A non well formed numeric value encountered in /in/9LeCV on line 4 string(4) "�_�1" Fatal error: Uncaught Error: Length must be greater than 0 in /in/9LeCV:5 Stack trace: #0 /in/9LeCV(5): random_bytes(0) #1 {main} thrown in /in/9LeCV on line 5
Process exited with code 255.
Output for 7.1.6
string(4) "�'x�" Notice: A non well formed numeric value encountered in /in/9LeCV on line 4 string(4) "e��j" Fatal error: Uncaught Error: Length must be greater than 0 in /in/9LeCV:5 Stack trace: #0 /in/9LeCV(5): random_bytes(0) #1 {main} thrown in /in/9LeCV on line 5
Process exited with code 255.
Output for 7.1.5
string(4) "��M" Notice: A non well formed numeric value encountered in /in/9LeCV on line 4 string(4) "q ؚ" Fatal error: Uncaught Error: Length must be greater than 0 in /in/9LeCV:5 Stack trace: #0 /in/9LeCV(5): random_bytes(0) #1 {main} thrown in /in/9LeCV 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/9LeCV on line 4 string(4) "#�|M" Fatal error: Uncaught Error: Length must be greater than 0 in /in/9LeCV:5 Stack trace: #0 /in/9LeCV(5): random_bytes(0) #1 {main} thrown in /in/9LeCV on line 5
Process exited with code 255.
Output for 7.0.20
string(4) "_�u" Notice: A non well formed numeric value encountered in /in/9LeCV on line 4 string(4) "���" Fatal error: Uncaught Error: Length must be greater than 0 in /in/9LeCV:5 Stack trace: #0 /in/9LeCV(5): random_bytes(0) #1 {main} thrown in /in/9LeCV on line 5
Process exited with code 255.
Output for 7.0.6
string(4) "�2Vo" Notice: A non well formed numeric value encountered in /in/9LeCV on line 4 string(4) "M��" Fatal error: Uncaught Error: Length must be greater than 0 in /in/9LeCV:5 Stack trace: #0 /in/9LeCV(5): random_bytes(0) #1 {main} thrown in /in/9LeCV on line 5
Process exited with code 255.
Output for 7.0.5
string(4) "u�`�" Notice: A non well formed numeric value encountered in /in/9LeCV on line 4 string(4) "��" Fatal error: Uncaught Error: Length must be greater than 0 in /in/9LeCV:5 Stack trace: #0 /in/9LeCV(5): random_bytes(0) #1 {main} thrown in /in/9LeCV on line 5
Process exited with code 255.
Output for 7.0.4
string(4) "��8�" Notice: A non well formed numeric value encountered in /in/9LeCV on line 4 string(4) "��}�" Fatal error: Uncaught Error: Length must be greater than 0 in /in/9LeCV:5 Stack trace: #0 /in/9LeCV(5): random_bytes(0) #1 {main} thrown in /in/9LeCV on line 5
Process exited with code 255.
Output for 7.0.3
string(4) "_�i" Notice: A non well formed numeric value encountered in /in/9LeCV on line 4 string(4) "ŝ*O" Fatal error: Uncaught Error: Length must be greater than 0 in /in/9LeCV:5 Stack trace: #0 /in/9LeCV(5): random_bytes(0) #1 {main} thrown in /in/9LeCV on line 5
Process exited with code 255.
Output for 7.0.2
string(4) "ԭ#" Notice: A non well formed numeric value encountered in /in/9LeCV on line 4 string(4) ":g�" Fatal error: Uncaught Error: Length must be greater than 0 in /in/9LeCV:5 Stack trace: #0 /in/9LeCV(5): random_bytes(0) #1 {main} thrown in /in/9LeCV 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/9LeCV on line 4 string(4) "���(" Fatal error: Uncaught Error: Length must be greater than 0 in /in/9LeCV:5 Stack trace: #0 /in/9LeCV(5): random_bytes(0) #1 {main} thrown in /in/9LeCV on line 5
Process exited with code 255.
Output for 7.0.0
string(4) ":V�" Notice: A non well formed numeric value encountered in /in/9LeCV on line 4 string(4) "�EyI" Fatal error: Uncaught Error: Length must be greater than 0 in /in/9LeCV:5 Stack trace: #0 /in/9LeCV(5): random_bytes(0) #1 {main} thrown in /in/9LeCV 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/9LeCV on line 3
Process exited with code 255.