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); } readfile('/tmp/.cant_touch_this');
based on ATfUY
Output for 5.4.0 - 7.1.0
filename: . : filetype: dir filename: .. : filetype: dir Warning: readfile(/tmp/.cant_touch_this): failed to open stream: No such file or directory in /in/YQ7Ip on line 10