3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $cwd = getcwd(); mkdir($cwd . '/test'); echo directory_exists($cwd . '/test');
Output for 7.1.25 - 7.3.1
Warning: mkdir(): open_basedir restriction in effect. File(//test) is not within the allowed path(s): (/tmp:/in:/etc) in /in/9IesF on line 5 Fatal error: Uncaught Error: Call to undefined function directory_exists() in /in/9IesF:7 Stack trace: #0 {main} thrown in /in/9IesF on line 7
Process exited with code 255.
Output for 7.1.20
Warning: mkdir(): open_basedir restriction in effect. File(//test) is not within the allowed path(s): (/tmp:/in) in /in/9IesF on line 5 Fatal error: Uncaught Error: Call to undefined function directory_exists() in /in/9IesF:7 Stack trace: #0 {main} thrown in /in/9IesF on line 7
Process exited with code 255.
Output for 7.0.0 - 7.1.10
Warning: mkdir(): Permission denied in /in/9IesF on line 5 Fatal error: Uncaught Error: Call to undefined function directory_exists() in /in/9IesF:7 Stack trace: #0 {main} thrown in /in/9IesF on line 7
Process exited with code 255.
Output for 5.3.28 - 5.3.29, 5.4.18 - 5.6.28
Warning: mkdir(): Permission denied in /in/9IesF on line 5 Fatal error: Call to undefined function directory_exists() in /in/9IesF on line 7
Process exited with code 255.
Output for 5.0.0 - 5.3.27, 5.4.0 - 5.4.17
Warning: mkdir(): Permission denied in /in/JQ3Fv on line 5 Fatal error: Call to undefined function directory_exists() in /in/JQ3Fv on line 7
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Warning: mkdir(/in/test): Permission denied in /in/JQ3Fv on line 5 Fatal error: Call to undefined function: directory_exists() in /in/JQ3Fv on line 7
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Warning: mkdir(/in/test): Permission denied in /in/JQ3Fv on line 5 Fatal error: Call to undefined function: directory_exists() in /in/JQ3Fv on line 7
Process exited with code 255.
Output for 4.3.1
Warning: mkdir(/in/test) [http://www.php.net/function.mkdir]: Permission denied in /in/JQ3Fv on line 5 Fatal error: Call to undefined function: directory_exists() in /in/JQ3Fv on line 7
Output for 4.3.0
Warning: mkdir(/in/test) [http://www.php.net/function.mkdir]: Read-only file system in /in/9IesF on line 5 Fatal error: Call to undefined function: directory_exists() in /in/9IesF on line 7