3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = random_bytes(23); var_dump( $a, bin2hex($a) );
based on dZoTS
Output for 7.2.0
string(23) " �f9z�4���>7�b��D ���" string(46) "0dc466397ac734888de8b23e37ed62e2e84409ccfeb8fc"
Output for 7.1.10
string(23) "}��"����⳥���~l ���6C" string(46) "7da78b22e283f4f0e4e2b3a59fb2b57e6c0df5a4e23643"
Output for 7.1.7
string(23) "e��t jkĨ�5�g�y7��y�y�" string(46) "659600be740c6a6bc4a8c335c167d47937d5de79d47996"
Output for 7.1.6
string(23) "��x3�/�z���29->��o�f>b" string(46) "82f97833822f8a7ab3a1f432392d3eb6931e6fb1663e62"
Output for 7.1.5
string(23) "vP's�|)����$�����" string(46) "765027739d1f7c29c70e05fdb7e124a1980e8411e494dc"
Output for 7.1.0
string(23) "�C%���.�MЩͱ�ǧ&�Pp" string(46) "f44325abd0df2ef74dd0a9cdb1f3c7a726835070031e13"
Output for 7.0.20
string(23) "~�t�L�nlP�e8�����n�" string(46) "7e861074b8084cb2116e6c1d50db653899adb384c86ec1"
Output for 7.0.6
string(23) "-�n>>M�$�9�`�9�꼘�o" string(46) "2d9c6e3e3e4dcc249c3916f2608739caeabc98e19c1e6f"
Output for 7.0.5
string(23) "�2�ʴlT ��0�>i� �w�" string(46) "dd32f8cab46c540cbbf4f530a917103e69a609ec897788"
Output for 7.0.4
string(23) "�Cy%�⦆i@A+hH�f� �sz�" string(46) "91437925b7efbda06940412b684815c5668a0df4737aeb"
Output for 7.0.3
string(23) "���>�{A�e���T�D�姐���" string(46) "ffaaa93ef27b41de65f9f9d354d144b0e5a7909db27fee"
Output for 7.0.2
string(23) "�9���zw�ti4/�G]м1��|" string(46) "d0390387be977a77977469342f83475dd0bc319af5047c"
Output for 7.0.1
string(23) "ZױuH?�~b��-f�+�ܨ��" string(46) "5ad7b175483fd3fa7e629fc92d66c42bfadca8a9b91d11"
Output for 7.0.0
string(23) "��/(� w����˄LnguN��" string(46) "16dde12f28ae0977d004aed5c408cb844c6e67754ea5f0"
Output for 5.3.20 - 5.6.28
Fatal error: Call to undefined function random_bytes() in /in/7cVFk on line 3
Process exited with code 255.