3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $zzfile = random_bytes(10); var_dump($zzfile); $filename = basename($zzfile); var_dump(preg_match('#\.(.+)$#', $filename, $matches)); var_dump($matches);
based on LFhfE
Output for 7.3.1
string(10) "������" int(0) array(0) { }
Output for 7.3.0
string(10) "��v"��+ T" int(0) array(0) { }
Output for 7.2.13
string(10) "�B���G=2��" int(0) array(0) { }
Output for 7.2.12
string(10) "��R�2?��" int(0) array(0) { }
Output for 7.2.11
string(10) "v 0��—� " int(0) array(0) { }
Output for 7.2.10
string(10) "�|� �{���g" int(0) array(0) { }
Output for 7.2.9
string(10) "j�3�0��" int(0) array(0) { }
Output for 7.2.8
string(10) "� ���,�" int(0) array(0) { }
Output for 7.2.7
string(10) "��?r$�-M�" int(0) array(0) { }
Output for 7.2.6
string(10) "�R��Y���+" int(0) array(0) { }
Output for 7.2.5
string(10) "�c���@��~g" int(0) array(0) { }
Output for 7.2.4
string(10) "wM�ՏVEd�l" int(0) array(0) { }
Output for 7.2.3
string(10) "�7ٵ�Nuyu?" int(0) array(0) { }
Output for 7.2.2
string(10) "�H���rG" int(0) array(0) { }
Output for 7.2.1
string(10) "W)��1[�8�" int(0) array(0) { }
Output for 7.2.0
string(10) "�΅��^;eT�" int(0) array(0) { }
Output for 7.1.25
string(10) ")0� an�<" int(0) array(0) { }
Output for 7.1.20
string(10) "�0�@@)`" int(0) array(0) { }
Output for 7.1.10
string(10) "���݆?�I " int(0) array(0) { }
Output for 7.1.7
string(10) "��i;�T��$p" int(0) array(0) { }
Output for 7.1.6
string(10) "���C�*M" int(0) array(0) { }
Output for 7.1.5
string(10) "0�KV�\bG#" int(0) array(0) { }
Output for 7.1.0
string(10) "X����쫱 " int(0) array(0) { }
Output for 7.0.20
string(10) "Y��' ��s" int(0) array(0) { }
Output for 7.0.6
string(10) "S��a���" int(0) array(0) { }
Output for 7.0.5
string(10) "�����~�▟" int(0) array(0) { }
Output for 7.0.4
string(10) "���M��:�" int(0) array(0) { }
Output for 7.0.3
string(10) "�pW����l�e" int(0) array(0) { }
Output for 7.0.2
string(10) " �p��'a�HE" int(0) array(0) { }
Output for 7.0.1
string(10) "���2��!��" int(0) array(0) { }
Output for 7.0.0
string(10) "o��jtG����" int(0) array(0) { }
Output for 5.3.21 - 5.6.28
Fatal error: Call to undefined function random_bytes() in /in/PsN2B on line 3
Process exited with code 255.