3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $dir = "./../tmp/"; if (is_dir($dir)) { if ($dh = opendir($dir)) { while (($file = readdir($dh)) !== false) { echo "filename: $file : filetype: " . filetype($dir . $file) . "\n"; } closedir($dh); } } ?>
Output for 5.3.0 - 5.6.28, 7.0.0 - 7.1.0
filename: . : filetype: dir filename: .. : filetype: dir
Output for hhvm-3.12.0
filename: . : filetype: dir filename: .. : filetype: dir filename: perf-30862.map : filetype: file
Output for hhvm-3.10.0
filename: . : filetype: dir filename: .. : filetype: dir filename: perf-30861.map : filetype: file