3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $dir = '/tmp/'; if ($dh = opendir($dir)) { while (($file = readdir($dh)) !== false) { echo "filename: $file : filetype: " . filetype($dir . $file) . "\n"; } closedir($dh); }
based on EEIKM
Output for 5.4.0 - 7.1.0
filename: . : filetype: dir filename: .. : filetype: dir