3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $dir = "./home"; // Öffnen eines bekannten Verzeichnisses und danach seinen Inhalt einlesen if (is_dir($dir)) { if ($dh = opendir($dir)) { while (($file = readdir($dh)) !== false) { echo "filename: $file : filetype: " . filetype($dir . $file) . "\n"; } closedir($dh); } }
based on qf8nd
Output for 5.4.39 - 5.5.32, 5.5.34 - 5.6.17, 5.6.20 - 5.6.28, 7.0.0 - 7.0.3, 7.0.5 - 7.1.0
Warning: filetype(): Lstat failed for ./home. in /in/M9uZ5 on line 8 filename: . : filetype: Warning: filetype(): Lstat failed for ./home.. in /in/M9uZ5 on line 8 filename: .. : filetype:
Output for 5.5.33, 5.6.18 - 5.6.19, 7.0.4
Warning: opendir(./home): failed to open dir: Permission denied in /in/M9uZ5 on line 6
Output for hhvm-3.12.0
Warning: filetype(): No such file or directory in /in/M9uZ5 on line 8 filename: . : filetype: Warning: filetype(): No such file or directory in /in/M9uZ5 on line 8 filename: .. : filetype:
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.4.34 - 5.4.38
Warning: filetype(): Lstat failed for ./home. in /in/M9uZ5 on line 8 filename: . : filetype: Warning: filetype(): Lstat failed for ./home.. in /in/M9uZ5 on line 8 filename: .. : filetype: Warning: filetype(): Lstat failed for ./homesjon in /in/M9uZ5 on line 8 filename: sjon : filetype:
Output for 5.2.3 - 5.4.32
Warning: filetype(): Lstat failed for ./home.. in /in/M9uZ5 on line 8 filename: .. : filetype: Warning: filetype(): Lstat failed for ./home. in /in/M9uZ5 on line 8 filename: . : filetype:
Output for 4.3.0 - 5.2.2