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.2.0
string(10) "�����b" 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.