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"; } /* This is the WRONG way to loop over the directory. */ while ($entry = readdir($handle)) { echo "$entry\n"; } closedir($handle); }
Output for 4.3.2 - 7.1.0
Warning: opendir(/in/): failed to open dir: Permission denied in /in/PWHbd on line 2
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/PWHbd on line 2