3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php if ($handle = opendir('/etc/')) { $blacklist = array('.', '..', 'somedir', 'somefile.php'); while (false !== ($file = readdir($handle))) { if (!in_array($file, $blacklist)) { echo "$file\n"; } } closedir($handle); } ?>
based on 8BHYk
Output for 5.4.0 - 7.3.0
localtime mtab hhvm ld.so.conf.d pacman.d profile.d skel arch-release bash.bash_logout bash.bashrc crypttab fstab gai.conf group gshadow host.conf hosts inputrc issue ld.so.conf locale.gen machine-id motd nscd.conf nsswitch.conf passwd php.ini php_archive.ini profile protocols resolv.conf rpc securetty services shadow shells ld.so.cache
Output for 5.3.19 - 5.3.29
Warning: opendir(/etc/): failed to open dir: Permission denied in /in/3Y1Vk on line 4