3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php if ($handle = opendir('/home/sjon/phpshell/root')) { 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 KXFZW
Output for 4.3.2 - 7.2.0
Warning: opendir(/home/sjon/phpshell/root): failed to open dir: No such file or directory in /in/WmFm5 on line 3
Output for 4.3.0 - 4.3.1
Warning: opendir(/home/sjon/phpshell/root) [http://www.php.net/function.opendir]: failed to open dir: No such file or directory in /in/WmFm5 on line 3