3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php if ($dh = opendir(realpath('./'))) { while ($file = readdir($dh)) { if (in_array($file, array('.', '..'))) continue; else echo $file . "\n"; } closedir($dh); }
Output for 5.2.3 - 7.1.0
Warning: opendir(/): failed to open dir: Permission denied in /in/Xik7l on line 3
Output for 4.3.2 - 5.2.2
Warning: opendir(/in): failed to open dir: Permission denied in /in/Xik7l on line 3
Output for 4.3.0 - 4.3.1
Warning: opendir(/in) [http://www.php.net/function.opendir]: failed to open dir: Permission denied in /in/Xik7l on line 3