3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump(dir(getcwd()));
based on BfI0n
Output for 5.5.24 - 7.2.0
Warning: dir(/): failed to open dir: Permission denied in /in/Klcv0 on line 3 bool(false)
Output for 5.3.0 - 5.4.45
object(Directory)#1 (2) { ["path"]=> string(1) "/" ["handle"]=> resource(5) of type (stream) }
Output for 5.2.3 - 5.2.17
object(Directory)#1 (2) { ["path"]=> string(1) "/" ["handle"]=> resource(4) of type (stream) }
Output for 4.3.2 - 5.2.2
Warning: dir(/in): failed to open dir: Permission denied in /in/Klcv0 on line 3 bool(false)
Output for 4.3.0 - 4.3.1
Warning: dir(/in) [http://www.php.net/function.dir]: failed to open dir: Permission denied in /in/Klcv0 on line 3 bool(false)