3v4l.org

run code in 300+ PHP versions simultaneously
<?php mkdir(sys_get_temp_dir() . '/foo/bar', 0777, true); mkdir(sys_get_temp_dir() . '/src/Dir', 0777, true); file_put_contents(sys_get_temp_dir() . '/src/Dir/Test.php', '<?php echo "Included\n";'); include sys_get_temp_dir() . '/src/Dir/Test.php'; include_once sys_get_temp_dir() . '/foo/bar/../../src/Dir/test.php';
Output for 8.0.0 - 8.0.12, 8.0.30, 8.1.21 - 8.1.28, 8.2.8 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
Included Warning: include_once(/tmp/foo/bar/../../src/Dir/test.php): Failed to open stream: No such file or directory in /in/b9pod on line 9 Warning: include_once(): Failed opening '/tmp/foo/bar/../../src/Dir/test.php' for inclusion (include_path='.:') in /in/b9pod on line 9
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 Included Warning: include_once(/tmp/foo/bar/../../src/Dir/test.php): Failed to open stream: No such file or directory in /in/b9pod on line 9 Warning: include_once(): Failed opening '/tmp/foo/bar/../../src/Dir/test.php' for inclusion (include_path='.:') in /in/b9pod on line 9
Output for 8.0.18, 8.0.21, 8.1.16, 8.2.3 - 8.2.7
Warning: mkdir(): File exists in /in/b9pod on line 3 Warning: mkdir(): File exists in /in/b9pod on line 4 Included Warning: include_once(): open_basedir restriction in effect. File(/tmp/foo/bar/../../src/Dir/test.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/b9pod on line 9 Warning: include_once(/tmp/foo/bar/../../src/Dir/test.php): Failed to open stream: Operation not permitted in /in/b9pod on line 9 Warning: include_once(): Failed opening '/tmp/foo/bar/../../src/Dir/test.php' for inclusion (include_path='.:') in /in/b9pod on line 9
Output for 8.0.14, 8.0.16 - 8.0.17, 8.0.20, 8.0.24, 8.0.27, 8.0.29, 8.1.0 - 8.1.8, 8.1.10 - 8.1.14, 8.2.0 - 8.2.2
Warning: mkdir(): open_basedir restriction in effect. File(/tmp/foo/bar) is not within the allowed path(s): (/tmp:/in:/etc) in /in/b9pod on line 3 Warning: mkdir(): File exists in /in/b9pod on line 4 Included Warning: include_once(): open_basedir restriction in effect. File(/tmp/foo/bar/../../src/Dir/test.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/b9pod on line 9 Warning: include_once(/tmp/foo/bar/../../src/Dir/test.php): Failed to open stream: Operation not permitted in /in/b9pod on line 9 Warning: include_once(): Failed opening '/tmp/foo/bar/../../src/Dir/test.php' for inclusion (include_path='.:') in /in/b9pod on line 9
Output for 8.1.20
Warning: mkdir(): open_basedir restriction in effect. File(/tmp/foo/bar) is not within the allowed path(s): (/tmp:/in:/etc) in /in/b9pod on line 3 Included Warning: include_once(): open_basedir restriction in effect. File(/tmp/foo/bar/../../src/Dir/test.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/b9pod on line 9 Warning: include_once(/tmp/foo/bar/../../src/Dir/test.php): Failed to open stream: Operation not permitted in /in/b9pod on line 9 Warning: include_once(): Failed opening '/tmp/foo/bar/../../src/Dir/test.php' for inclusion (include_path='.:') in /in/b9pod on line 9
Output for 8.0.15, 8.0.22 - 8.0.23, 8.0.25 - 8.0.26, 8.0.28, 8.1.9, 8.1.15, 8.1.17 - 8.1.19
Warning: mkdir(): File exists in /in/b9pod on line 3 Warning: mkdir(): File exists in /in/b9pod on line 4 Included Warning: include_once(/tmp/foo/bar/../../src/Dir/test.php): Failed to open stream: No such file or directory in /in/b9pod on line 9 Warning: include_once(): Failed opening '/tmp/foo/bar/../../src/Dir/test.php' for inclusion (include_path='.:') in /in/b9pod on line 9
Output for 8.0.19
Warning: mkdir(): File exists in /in/b9pod on line 3 Included Warning: include_once(/tmp/foo/bar/../../src/Dir/test.php): Failed to open stream: No such file or directory in /in/b9pod on line 9 Warning: include_once(): Failed opening '/tmp/foo/bar/../../src/Dir/test.php' for inclusion (include_path='.:') in /in/b9pod on line 9
Output for 8.0.13
Warning: mkdir(): Permission denied in /in/b9pod on line 3 Warning: mkdir(): File exists in /in/b9pod on line 4 Included Warning: include_once(/tmp/foo/bar/../../src/Dir/test.php): Failed to open stream: No such file or directory in /in/b9pod on line 9 Warning: include_once(): Failed opening '/tmp/foo/bar/../../src/Dir/test.php' for inclusion (include_path='.:') in /in/b9pod on line 9
Output for 7.3.32 - 7.3.33, 7.4.33
Warning: mkdir(): Not a directory in /in/b9pod on line 3 Warning: mkdir(): File exists in /in/b9pod on line 4 Included Warning: include_once(/tmp/foo/bar/../../src/Dir/test.php): failed to open stream: No such file or directory in /in/b9pod on line 9 Warning: include_once(): Failed opening '/tmp/foo/bar/../../src/Dir/test.php' for inclusion (include_path='.:') in /in/b9pod on line 9
Output for 7.4.28 - 7.4.32
Warning: mkdir(): File exists in /in/b9pod on line 3 Warning: mkdir(): File exists in /in/b9pod on line 4 Included Warning: include_once(/tmp/foo/bar/../../src/Dir/test.php): failed to open stream: No such file or directory in /in/b9pod on line 9 Warning: include_once(): Failed opening '/tmp/foo/bar/../../src/Dir/test.php' for inclusion (include_path='.:') in /in/b9pod on line 9
Output for 7.4.27
Warning: mkdir(): open_basedir restriction in effect. File(/tmp/foo/bar) is not within the allowed path(s): (/tmp:/in:/etc) in /in/b9pod on line 3 Warning: mkdir(): File exists in /in/b9pod on line 4 Included Warning: include_once(): open_basedir restriction in effect. File(/tmp/foo/bar/../../src/Dir/test.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/b9pod on line 9 Warning: include_once(/tmp/foo/bar/../../src/Dir/test.php): failed to open stream: Operation not permitted in /in/b9pod on line 9 Warning: include_once(): Failed opening '/tmp/foo/bar/../../src/Dir/test.php' for inclusion (include_path='.:') in /in/b9pod on line 9
Output for 7.4.26
Warning: mkdir(): File exists in /in/b9pod on line 4 Included Warning: include_once(/tmp/foo/bar/../../src/Dir/test.php): failed to open stream: No such file or directory in /in/b9pod on line 9 Warning: include_once(): Failed opening '/tmp/foo/bar/../../src/Dir/test.php' for inclusion (include_path='.:') in /in/b9pod on line 9
Output for 7.0.0 - 7.0.31, 7.1.0 - 7.1.21, 7.2.0 - 7.2.33, 7.3.16 - 7.3.31, 7.4.0 - 7.4.25
Included Warning: include_once(/tmp/foo/bar/../../src/Dir/test.php): failed to open stream: No such file or directory in /in/b9pod on line 9 Warning: include_once(): Failed opening '/tmp/foo/bar/../../src/Dir/test.php' for inclusion (include_path='.:') in /in/b9pod on line 9

preferences:
196.47 ms | 403 KiB | 204 Q