3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $length = 10; $bytes = openssl_random_pseudo_bytes($length * 2); $longs = unpack("S", $bytes); var_dump($bytes); var_dump($longs);
based on Lccvp
Output for 7.1.0
string(20) "bB#4B�L�vG�l�j�1" array(1) { [1]=> int(25108) }
Output for 7.0.14
string(20) "q!��yu75�'�H�<|4(�" array(1) { [1]=> int(8561) }
Output for 7.0.6
string(20) "����'@���̗�^J�/��" array(1) { [1]=> int(42890) }
Output for 7.0.5
string(20) "��8�bȪّ�R�U�;�B��" array(1) { [1]=> int(46720) }
Output for 7.0.4
string(20) "�3��*q}4�c�c��d�" array(1) { [1]=> int(5311) }
Output for 7.0.3
string(20) "�l�����wk�� �� QM��" array(1) { [1]=> int(27785) }
Output for 7.0.2
string(20) "F�pį��og!`��"q�I" array(1) { [1]=> int(43078) }
Output for 7.0.1
string(20) " ��u��l&�Ϫ��`V�" array(1) { [1]=> int(56077) }
Output for 7.0.0
string(20) "��h���`.\�GW��)#��'" array(1) { [1]=> int(32725) }
Output for hhvm-3.12.0
string(20) "̄ҷՒYo��;Ѱ}p��p�" array(1) { [1]=> int(33996) }
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.6.28
string(20) "ժǔ\0���h�ǹ�U�S&" array(1) { [1]=> int(43733) }
Output for 5.6.21
string(20) "԰fS� ���� @�a;�v" array(1) { [1]=> int(45268) }
Output for 5.6.20
string(20) "h�C�e;(l�vWza5�j�t" array(1) { [1]=> int(60520) }
Output for 5.6.19
string(20) "�Ȩ(��))�� �r��E�Q�" array(1) { [1]=> int(51372) }
Output for 5.6.18
string(20) "�e�g�$4(�a@|�C�U�" array(1) { [1]=> int(7095) }
Output for 5.6.17
string(20) " ���0�x����k �5$́�" array(1) { [1]=> int(39434) }
Output for 5.6.16
string(20) "d�8��_��,�G3Wp���" array(1) { [1]=> int(37220) }
Output for 5.6.15
string(20) "�Z��ST�P����� V��" array(1) { [1]=> int(23174) }
Output for 5.6.14
string(20) "��ԮU����������" array(1) { [1]=> int(60300) }
Output for 5.6.13
string(20) "ۺBFڅ�D$"s�4��U�>R" array(1) { [1]=> int(47835) }
Output for 5.6.12
string(20) "���(�%M�0��^ �eE" array(1) { [1]=> int(54680) }
Output for 5.6.11
string(20) "/�m=�a���9�\>�Z��" array(1) { [1]=> int(44335) }
Output for 5.6.10
string(20) "9�pf�f��f�y^A�#!Vg" array(1) { [1]=> int(42297) }
Output for 5.6.9
string(20) "+��NَES��h �qQ�" array(1) { [1]=> int(49451) }
Output for 5.6.8
string(20) "�IC��L�n+� �,f�(�" array(1) { [1]=> int(18904) }
Output for 5.5.35
string(20) "mX"=�2ӑ+_�y\�s�" array(1) { [1]=> int(7277) }
Output for 5.5.34
string(20) "��Sm�|���޸�xw�" array(1) { [1]=> int(4084) }
Output for 5.5.33
string(20) "�dP�����?��6���j" array(1) { [1]=> int(25731) }
Output for 5.5.32
string(20) "���<��fUI�)"���1" array(1) { [1]=> int(56542) }
Output for 5.5.31
string(20) ":���z�0S&� &J�]�s" array(1) { [1]=> int(37690) }
Output for 5.5.30
string(20) "��C����Ez�&$���d" array(1) { [1]=> int(59625) }
Output for 5.5.29
string(20) "<��=(um�᯹\N" array(1) { [1]=> int(15385) }
Output for 5.5.28
string(20) "�E�D%`��tڐ6�2�I�B�" array(1) { [1]=> int(17883) }
Output for 5.5.27
string(20) "R6�o����jLn��a�!��3" array(1) { [1]=> int(13906) }
Output for 5.5.26
string(20) "�(i^ t��'��z�� n��" array(1) { [1]=> int(10414) }
Output for 5.5.25
string(20) "�5W��V���RY���rxt�" array(1) { [1]=> int(13698) }
Output for 5.5.24
string(20) "��h �X� ����0& ���'B" array(1) { [1]=> int(60644) }
Output for 5.4.45
string(20) ";n&����`y&�+T��F��" array(1) { [1]=> int(28219) }
Output for 5.4.44
string(20) "�*ı���9���aR��" array(1) { [1]=> int(5654) }
Output for 5.4.43
string(20) "ĘR`�ߒ�;�����p�" array(1) { [1]=> int(39108) }
Output for 5.4.42
string(20) "��{x�F���r'0@3�" array(1) { [1]=> int(47893) }
Output for 5.4.41
string(20) "n��l�� �b�`�D{g�" array(1) { [1]=> int(28182) }
Output for 5.4.40
string(20) "6�"l{.KU:N׹�O��1�" array(1) { [1]=> int(49718) }
Output for 5.4.39
string(20) "xx+��]���kN���" array(1) { [1]=> int(30840) }
Output for 5.4.38
string(20) "�[z"�'mG�qw�����" array(1) { [1]=> int(23454) }
Output for 5.4.37
string(20) "��㇝N3��yT�����" array(1) { [1]=> int(44181) }
Output for 5.4.36
string(20) "�����@���n��G^" array(1) { [1]=> int(33430) }
Output for 5.4.35
string(20) "���)i)��+Ds� ���" array(1) { [1]=> int(33972) }
Output for 5.4.34
string(20) "+��e.b<��x8M�bG�" array(1) { [1]=> int(41771) }
Output for 5.0.0 - 5.4.32
Fatal error: Call to undefined function openssl_random_pseudo_bytes() in /in/33p92 on line 4
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: openssl_random_pseudo_bytes() in /in/33p92 on line 4
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: openssl_random_pseudo_bytes() in /in/33p92 on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: openssl_random_pseudo_bytes() in /in/33p92 on line 4