3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $stream = opendir(__DIR__); var_dump(stream_get_meta_data($stream));
Output for 5.3.0 - 5.6.28, 7.0.0 - 7.1.0
Warning: opendir(/in): failed to open dir: Permission denied in /in/A3GLd on line 3 Warning: stream_get_meta_data() expects parameter 1 to be resource, boolean given in /in/A3GLd on line 4 NULL
Output for hhvm-3.10.0 - 3.12.0
Warning: Permission denied in /in/A3GLd on line 3 Warning: stream_get_meta_data() expects parameter 1 to be resource, boolean given in /in/A3GLd on line 4 NULL
Output for 4.3.5 - 5.2.17
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/A3GLd on line 3 Warning: opendir(__DIR__): failed to open dir: No such file or directory in /in/A3GLd on line 3 Warning: stream_get_meta_data(): supplied argument is not a valid stream resource in /in/A3GLd on line 4 bool(false)
Output for 4.3.2 - 4.3.4
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/A3GLd on line 3 Warning: opendir(__DIR__): failed to open dir: No such file or directory in /in/A3GLd on line 3 Warning: stream_get_meta_data(): supplied argument is not a valid stream resource in /in/A3GLd on line 4 NULL
Output for 4.3.0 - 4.3.1
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/A3GLd on line 3 Warning: opendir(__DIR__) [http://www.php.net/function.opendir]: failed to open dir: No such file or directory in /in/A3GLd on line 3 Warning: stream_get_meta_data(): supplied argument is not a valid stream resource in /in/A3GLd on line 4 NULL