3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php if ($handle = opendir('/in')) { echo "Directory handle: $handle\n"; echo "Entries:\n"; /* This is the correct way to loop over the directory. */ while (false !== ($entry = readdir($handle))) { echo "$entry\n"; } closedir($handle); }
based on KutJZ
Output for 4.3.2 - 5.6.28, 7.0.0 - 7.1.0
Warning: opendir(/in): failed to open dir: Permission denied in /in/RYRNB on line 3
Output for hhvm-3.10.0 - 3.12.0
Warning: Permission denied in /in/RYRNB on line 3
Output for 4.3.0 - 4.3.1
Warning: opendir(/in) [http://www.php.net/function.opendir]: failed to open dir: Permission denied in /in/RYRNB on line 3