3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php echo __DIR__; $res = mkdir(__DIR__."/test"); var_dump($res);
based on HAQ1T
Output for 5.6.28, 7.0.14 - 7.1.0
/in Warning: mkdir(): Permission denied in /in/NpBPe on line 3 bool(false)
Output for 5.3.0 - 5.6.21, 7.0.0 - 7.0.6
/in Warning: mkdir(): Read-only file system in /in/NpBPe on line 3 bool(false)
Output for 5.0.0 - 5.2.17
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/NpBPe on line 2 __DIR__ Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/NpBPe on line 3 Warning: mkdir(): No such file or directory in /in/NpBPe on line 3 bool(false)
Output for 4.3.2 - 4.4.9
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/NpBPe on line 2 __DIR__ Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/NpBPe on line 3 Warning: mkdir(__DIR__/test): No such file or directory in /in/NpBPe on line 3 bool(false)
Output for 4.3.0 - 4.3.1
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/NpBPe on line 2 __DIR__ Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/NpBPe on line 3 Warning: mkdir(__DIR__/test) [http://www.php.net/function.mkdir]: No such file or directory in /in/NpBPe on line 3 bool(false)