3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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 5.6.30, 7.0.0 - 7.2.9
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 hhvm-3.22.0
Included Warning: include_once(/tmp/foo/bar/../../src/Dir/test.php): File not found in /in/b9pod on line -1
Output for hhvm-3.15.4 - 3.21.3
Included Warning: include_once(/tmp/foo/bar/../../src/Dir/test.php): File not found in /in/b9pod on line 9