3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $path = "test.php../../../../../../../../../../../../../../../../etc/passwd"; $path = "test.php../../../../../../../../../../../../../../../../usr/bin/php"; include $path; var_dump(realpath($path));
Output for 5.1.0 - 5.2.0, 5.2.3 - 5.6.28, 7.0.0 - 7.1.0
Warning: include(test.php../../../../../../../../../../../../../../../../usr/bin/php): failed to open stream: No such file or directory in /in/FZroY on line 5 Warning: include(): Failed opening 'test.php../../../../../../../../../../../../../../../../usr/bin/php' for inclusion (include_path='.:') in /in/FZroY on line 5 bool(false)
Output for hhvm-3.10.0 - 3.12.0
Warning: File not found: test.php../../../../../../../../../../../../../../../../usr/bin/php in /in/FZroY on line 5 bool(false)
Output for 5.2.1 - 5.2.2
Warning: include(test.php../../../../../../../../../../../../../../../../usr/bin/php): failed to open stream: No such file or directory in /in/FZroY on line 5 Warning: include(): Failed opening 'test.php../../../../../../../../../../../../../../../../usr/bin/php' for inclusion (include_path='.:') in /in/FZroY on line 5 string(13) "//usr/bin/php"
Output for 4.3.2 - 5.0.5
Warning: main(test.php../../../../../../../../../../../../../../../../usr/bin/php): failed to open stream: No such file or directory in /in/FZroY on line 5 Warning: main(): Failed opening 'test.php../../../../../../../../../../../../../../../../usr/bin/php' for inclusion (include_path='.:') in /in/FZroY on line 5 bool(false)
Output for 4.3.0 - 4.3.1
Warning: main(test.php../../../../../../../../../../../../../../../../usr/bin/php) [http://www.php.net/function.main]: failed to create stream: No such file or directory in /in/FZroY on line 5 Warning: main() [http://www.php.net/function.main]: Failed opening 'test.php../../../../../../../../../../../../../../../../usr/bin/php' for inclusion (include_path='.:') in /in/FZroY on line 5 bool(false)