3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $length = 125; $bytes = random_bytes($length); var_dump($bytes, bin2hex($bytes));
based on ia8vK
Output for 7.3.0alpha1
string(125) "���F�`>CV�J�;Y9RuR/���!�oH� �X*�:J�>6��9m�u|� �B ����_��,�N����1�\�?�(�Wc j��� hPI[Y�“Є��鰐j�=�dB�� J" string(250) "aaafd246e4603e430356db4aa0103b59395275522fb1928621eec16f48ca1a080a8b10582aa73a4ac03e361ea19a39056dec757cc70df0ba42060bb2bdb78a5fa202be2cf54eb11bf018fea23189005cb53f1ef39428ff57630d6aad03a71ea30b6850495b59a815c293d084c1daf8e9b0906aac3daf6442138cc8094a"
Output for 7.2.6
string(125) "��h $��z {��l`��l^���a>5��ݳ��z���zq�md(Uᆮ����Ըk��V�B�'�j9�jc����N9v;�ރ��P�]D,W2�����9�� ��G��F]&�B" string(250) "c0139d680d0c241090dc7a097ba4e29b066c6090b36c5eba911dc5613e35a890ddb3c4cf7ae6f1e7fa7a1971ba6d642855e186ae8ce386d11a03930ed4b86bfb1a9956e542a127836a39c86a638ea986844e39763b1b80de83dbf050f0185d442c5732a91ffcb114c911fe1c39cb1fbb0b1cf6eb8e479eba465d26b042"
Output for 7.2.5
string(125) "�a�R��VN���{�$�H��8��u���{cajE�u#� j(�*��}ǧkf�vY��a�sȣ6=�[ ��}h��W�5ϧ(�A��8�̧��,s��xX�t(ٕ�/�ᱏ��� �Z~ݦO" string(250) "fb61d952b7cf564eadbce5f7ff7b8e24a40248019cc93895cc75b39fa17b63616a45ac75239a206a28922a8ea97dc7a76b66f3a1765991bf619d73c8a3363d0e8e5b20ad8f1d7d68930219c657c28fe735cfa7289441bbc0153801c4cca7c7cb2c738e977858c47428d995d02fb1e1b18fbb13d0109e0cdd5a7edda64f"
Output for 7.2.0
string(125) "{ֵ5���(����i�Y�W5�[�jC���WW�3cHz��B��k6~�d�!����E��q͇��"�+]|?!�7[\l�-�G<�;�]�D.��8�L2�(����-�Z��^�CG��" string(250) "7bd6b535a59480281317f7c0e70718cffc698159895735885bbc6a43d6f4d35757cf1f3363487af2d642008be66b36197ed364b021c0b1efea45bc9671cd8790d3229d2b5d7c3f21ec371c5b5c6c892da6000f47103c8c3bf6065df2bb1c442ea4c63804844c32c4c1280499b28bd6192db65aef93db5e18a643478290"
Output for 7.1.7
string(125) "�YT�7xpL��j��౿��d�=>������UK����]$ԟ�OKf���}�x�ح�}�)Z_��C^�f�5 ��� )�Iۀ�c�g)�m���%�ߊ�D�v���7�� ���Y��" string(250) "9117595408e43778704cb9c86aeca0e4e0b1bfa6bf64823d3ea9f4c017b7a2bcd7554b87b1b304f55d24d49f944f4b66ededd67d01fb1c78b2d8ad04e5167dd3295a5f150595d6435e1cb366f7350ac3e6f30c290fe149db80ecc1b363b6670029c86dadd7e92583df8aef44ed769dc4d137b796209ca8c459bc138a17"
Output for 7.1.6
string(125) "�|DX*����HO�, 2;z�,^7�{M7F�R�jA��M�rE >Ei>0��� �J�͢��aG���(�3���@��@?��6�*٤���4k ��E����'�C`��i�� p<���" string(250) "eb7c08440458052adfe3ecb8eb484f01de2c0d323b7abb2c5e37a57b4d3746f0f88d5204fd6a4187841e154db172450c183e4569051b3e30d9e602b70dec4a8615cda2f6d2614702eadac41628ea33a181cd1d409ea4403fbeb136f52ad9a4cd7ff5d5346b20ddc745f58c8fbe27e04360929e6996c00d703cdbc8efb6"
Output for 7.1.5
string(125) "\�(X����;�Pݢ�sѶ��i��T���k��Ȅ)�Jȥ �Ģ�U]T{�ŷ�����=}�P��F�4( �0�� ���A�zG�����&dc�0����]�KG��P��M�yOw�_����dK��" string(250) "5c942858bba698dc193b11d150dda2dc73d1b6a28a69b6fb54b9819d6b1691048bc88429af4ac8a5170b89c4a2cd555d547b13e3c5b78b83a7f5b23d7d8c50999946f434280de930c0ae0cc18dc641e57a47c0a1bdb8c41f26646300a7309eb091bf5de34b478c9750f6931a4db2794f77f0b85f929b99ed9b644bfcb0"
Output for 7.1.0
string(125) "�� 8^��*ڏ��l� ��+s��j+���wF�gx�_��☁�nb�W,�:�R:�,��=ޱ�d��%���9uc���� (D�g��(�#)����� |��C�f�c��~��.�8 J*�^��2�rB#�" string(250) "89840b385eafef2ada8f9fa46ca50d90eb2b1673f2e76a2b9ca403d37746fc6778d55fadebe29881b46e6292572c9d3af1523a811f2ceef23ddeb1b464d705e325b9e6de397563b1e2e5c22028449667ad1fb91228e7232990b6b1f81ff2097c8aa043eb0166d6639c867ea5af2ed0380a4a2ae95efab032fd7242238d"
Output for 7.0.20
string(125) "��N�� �VYu g1NDG}@B('SW�����á�����:`7�_+5(� ��2��5��w����3�2���Qv�d?���ڞ_����x���9FtxQ�n���B�*�G �{��������" string(250) "b1944eeac40ad25659750c0367314e44477d4042282706535798b4b3accec3a117dad60887dff03a601f37f15f2b3528810cdeec32c1f035e38811847f77efd2caeea1f933843295e5e45176bd643ff2db12188ada9e5f9e97e4c5789699a03946747851d46eaa88bb42cd2ab102470a907bb79e80e602c11888b2ea10"
Output for 7.0.12
string(125) "�*�z�#�I:�E��k�ֲk�JVxlD�C��֏I�jS�T)����sP�nG�d�k�8�Ngd���!P�ܕԵ�X�k�Z|���f��2��7�'�2�T��}R��E�޺Ǐ�FG�t" string(250) "fd2aee7a941823f3493af1458605d76bbbd6b2156bc04a56786c44af1f0243b4ee94d68f49ed6a1553e3542991a7f5867350d96e1747dd640eee6be13806f6164e6764059801e514ed21508e04dc95d4b502f7581ef86bd25a7c99bead668ad132b9a237d22783329f54c31c887d529ae045b1debac78fa87f4647ba74"
Output for 7.0.11
string(125) "����. J �B�@�����j����O#@E��M|�g�B�q�����;Ε o�>Uq��@ ��4�9����}Þ�a-)�yC!��Na� ��S�'+�S~b����\�d" string(250) "b7f4f188b41916db2e0c4a099a42c1191640ffef93a9e1d5f09789e4f59e6a11fb93ead44f0323054045bfd318164d7ce3a767db42f171c60204f0efcec63bce950c6f0308823e5571e0f44009fa138834fb39dc10e4e5c908157dc39e9b612d29e7794321f7894e61edb909b68a5396272bc7537e62bb928fda5c9264"
Output for 7.0.10
string(125) "��K��`��@3gS���Y�$�㆒�b�^j6}�j��+��U5^��9�m!.��:�'Α�6k��n��C��с��(��\�KQ9`e �E�ŀ�O��=�^$:>��&%��" string(250) "f7e14bfec960dce740331b670f53bd15ffe7f959b624a9e38692d862c75e6a19367de36ae2f5a39d2b7fb4f3bf553517185e809102399d6d212e9af73a9a27ce91ab366bf58e6eaa921243ac0fead1811293eea00e2807daef855ca14b51396065140b88459bc580f84fa1f48a3d08b05e0e243a033ea88c2625c4cf03"
Output for 7.0.9
string(125) "'���3��gU �Vq�"�=� (�&�꣼���q=����"o�e�L��>&����.�i |g4���d�|�&(?��l��axt7">��Ϙ�^�-�w�NS��'����~�L� " string(250) "27bfacbb338a926755040db114561271ba220fb4153df3a70b28ee2607e2eaa3bc15a696e0713d9ee1f49aee226fac650ebe4c15d8c83e26a29616a1a82ea669040d7c673412a591f56411fd7cdf26283fb6b36ca4ef6115787437223edef297cf988f5ebb2d9077ff4e1253dc12ff27b98815859e7e9a4c07e1ff0f0c"
Output for 7.0.8
string(125) "ʻ��౲i��L�wh�Q�x���V��J��9HU{!(�����c:~҄E�!��{i�`�?�HIG�"�~MaC&qZC{H�&�Fh�/��0��.Y"�\��s���tv0,�" string(250) "cabb9e8ce0b1b26981ad4c00df7768b75116c878d9e2e156bcf34a94c039044855047b15210528eacecaf4ecbb1163023a7e01d2841f45d70421dbd97bef8a9b69d960158b3f8d484947ea0408221ca07e034d614326715a437b48be26f1bbab46687fbd052ffd9030aabb2e5922905c12b002ab73abd0d17476302ca0"
Output for 7.0.7
string(125) "��i;���#+N�C{��k�z�`�jG�KA"/a�$#ֳ��@-��l��U�顊�0~%�ƚ�|�?G�F���oj�箼���s����1�ß,�*-���1���!����״�~%�{�J" string(250) "f8d8693bf9e1bcf8e4232b4eca437b84bf6b07a27ae59960b26a47cc4b41222f61a92423d6b3adc29d178240182d0090946cb2d50555d5e9a18a88307e06259fc69af57c803f47e84618e5b81fb8198c6f6aade7aebcafe2ef739eb4a28e31cbc39f2cda2a2d9adada31bfa510a5218b83128f96d7b4ec7e25e87bf24a"
Output for 7.0.6
string(125) "�V wT,g�Rg�EUx�{����hO�k � p͉��xZۛ���RԦ�^ ݊��K׉ L�O��\�dq=�^��s��z3F��:A�����{ R�nx c�F�o��s�3�jn@�H�(�O" string(250) "8a5609777f542c67ac5267fa455578d7067b8cfb8b0717b4684f976b0aea0c70cd89cfe6785a14db9bb18cac5218d4a6e2a45e0add8af0e1084bd7890c4cda4ff18200eda75cb364713dd85e7f81f673b1ba7a33468c843a41b3968ad4c87b0b52e5a26e780c63cc46b96f838873b633e8a46a6e40db480fa928f71c4f"
Output for 7.0.5
string(125) "���g����*�#C�}�x�lj��=�w�-h���Ex���i��MI�.�'~�������pF����,C!�w[���c��+��8Uǥ�N��:�����7��.��BL���CT@��" string(250) "f2dcec67bb14b4d1f1162ab413102343b97df578b5c7898caf3d19ca77862d689efd01d91f457892a3b40569f00382024d49861b1f2ee8277e8abc908ef90115c9c8704698def184e02c430321df775b8a1aa7da6397ee2b80d61e3855c7a5fc1e4e089cdd3aa5e81d9dadbb37fa1bf22ef0df424c89fdb8435440f9a9"
Output for 7.0.4
string(125) "B'���-F'#������Q, "8 ���8 ��Y�j�H�ĵ ���I-z��f��D;����ȡD7|!�ծJa�J*��F�����Ouf�w���9t:^� +<F��eث;�!�*?�b�)�}��" string(250) "16422714a781db2d462723a9f7bfcbdcc9512c0b22380cc0d9eb380df78d59d56ae348a5c4b509e01c92d6492d7ac80119d9660495eab6fe443bb9adfc82c8a144377c21cdd5ae4a610fa24a2ae5e246c6e7d6d9e14f7566bb77c085a539743a5e178e0a2b3c4695bd65d8ab3bc621912a043f06c262b4298b7daaf513"
Output for 7.0.3
string(125) " *�d*?�U�+����Ԇ�1�JK��ݖ�n��θ�~!��q��Q�z��,�F�}�w{Et��s�� +VF9Y���]�%9y�_�:�3N�Ib��4'�6��j�&)*�'���|A7V�" string(250) "0d2a9e642a3ff6559f2bfa9f0fe5efd486e3a831c14a1e4bdac6dd96e56eab83ceb8ec7e21fb06a0047185900314518a1c7a9f842c8c46cc7d9f777b4574881bde7387c30c2b5646395986c9f15d97253908020610798e5fd23afa334ee5496298e2340727bb36089ffe6aff26292abb27c1e4e3a17c41371f561afd02"
Output for 7.0.2
string(125) "~���>��v��Ԅ�p9WW�i������t����a<y~���O���,��dN��&�����=q���Vgc ����f'�aE��b���~��� F� ]��^����o�߇�%�4�nE" string(250) "7ea996cd3eecc676adf8d48403d07039575708ca19698f90afb184dc74cb1c15e0e8bac4613c797ed7c9d64faeded6002cadd1644e12a214ed0126ebd4f18cecd33d71b38bd0561d676320b28bb88566271d7fca14610045a1f862f8b199127e89f012892046fc0a5d8c815ea6a587bf6fe9df878925a03404966e451a"
Output for 7.0.1
string(125) "2=�V��Mǟ䑖�g�#���(�T�f��vg �&�`��CX͠���D�MA��yJ�/�p���Je�o<f��N� ����ě�<�r�<�!w��q#ƛ� +�n��I�w@�Ґ�~m��A��!" string(250) "32083dfb56fcfd4dc79fe49196a067bf23908e80289a54f36690f276670ddf26b660021dbae24358cda01886b6ccfb4417974d0141dcf0b2794ae32fb070adc5198c4a65ff6f3c66bccc4ee309a092c0870ec49bd53cc572bb3cd42177e78bc37123c69bf80c2bc36ee9be7f9b49bf7740f6d290cd7e6d90bb41bfed21"
Output for 7.0.0
string(125) "ƹM�x @�v?eG#T�u�O��W�t>�"V�/&?��@�37Zc�f�P����u����Z��c\=_o@��O���*^�o �@��h|����ݺ���v�#'M�9ht�s0��Q��n�" string(250) "c6b94da978070b4012f5763f6547192354ca751be04fb0d157b3743eae2256df2f263fbb1807e540b833375a63d7668850f781eda7e3b075a9b39dfe5af7d9635c3d11035f6f408ed24f9fc8d62a5e98186f20131bf740fabc68007c81a99ed6ddbad6e6f40876bd23274d00da1c396874840e7330b1ab518ae68e6e97"
Output for 5.6.0 - 5.6.27
Fatal error: Call to undefined function random_bytes() in /in/fEdsJ on line 3
Process exited with code 255.