3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $zzfile = random_bytes(100); $filename = basename($zzfile); var_dump(preg_match('#\.(.+)$#', $filename, $matches)); var_dump($matches);
Output for 7.0.0 - 7.0.1, 7.0.3, 7.0.5 - 7.0.20, 7.1.7 - 7.2.0
int(0) array(0) { }
Output for 7.1.6
int(1) array(2) { [0]=> string(66) ".A?Q}�;e�׭ӫ���B����Yt!f6����{��Z5�61�:hBB�3Q�q+�i�[ � ^b" [1]=> string(65) "A?Q}�;e�׭ӫ���B����Yt!f6����{��Z5�61�:hBB�3Q�q+�i�[ � ^b" }
Output for 7.1.5
int(1) array(2) { [0]=> string(57) ".-w��9db�S�њ���-�;���q�x�"н�N����(Se�bt�Wج2�" [1]=> string(56) "-w��9db�S�њ���-�;���q�x�"н�N����(Se�bt�Wج2�" }
Output for 7.1.0
int(1) array(2) { [0]=> string(27) ".���7�B���D+q�oL� _X�nr�" [1]=> string(26) "���7�B���D+q�oL� _X�nr�" }
Output for 7.0.4
int(1) array(2) { [0]=> string(61) ".��;��C,��>8r�DS���&ʟ�~a~`�w�˰��4\.<������Q��<עU����" [1]=> string(60) "��;��C,��>8r�DS���&ʟ�~a~`�w�˰��4\.<������Q��<עU����" }
Output for 7.0.2
int(1) array(2) { [0]=> string(29) ".�J��C��ew�E�vC��� Kd�$��" [1]=> string(28) "�J��C��ew�E�vC��� Kd�$��" }
Output for 5.3.21 - 5.6.28
Fatal error: Call to undefined function random_bytes() in /in/10iGa on line 3
Process exited with code 255.