3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $language_array = array("en", "de", "fr"); $language = 'fr'; if (!in_array($language, $language_array)) { $language = 'en'; } include 'inc/header.php'; $page = isset($_GET['page']) ? $_GET['page'] : null; if (!include 'pages' . $page . '.php') { //header("HTTP/1.1 404 Not Found"); echo '404'; } include 'inc/footer.php'; ?>
Output for 5.1.0 - 7.1.0
Warning: include(inc/header.php): failed to open stream: No such file or directory in /in/WrStE on line 11 Warning: include(): Failed opening 'inc/header.php' for inclusion (include_path='.:') in /in/WrStE on line 11 Warning: include(pages.php): failed to open stream: No such file or directory in /in/WrStE on line 14 Warning: include(): Failed opening 'pages.php' for inclusion (include_path='.:') in /in/WrStE on line 14 404 Warning: include(inc/footer.php): failed to open stream: No such file or directory in /in/WrStE on line 19 Warning: include(): Failed opening 'inc/footer.php' for inclusion (include_path='.:') in /in/WrStE on line 19
Output for 4.3.2 - 5.0.5
Warning: main(inc/header.php): failed to open stream: No such file or directory in /in/WrStE on line 11 Warning: main(): Failed opening 'inc/header.php' for inclusion (include_path='.:') in /in/WrStE on line 11 Warning: main(pages.php): failed to open stream: No such file or directory in /in/WrStE on line 14 Warning: main(): Failed opening 'pages.php' for inclusion (include_path='.:') in /in/WrStE on line 14 404 Warning: main(inc/footer.php): failed to open stream: No such file or directory in /in/WrStE on line 19 Warning: main(): Failed opening 'inc/footer.php' for inclusion (include_path='.:') in /in/WrStE on line 19
Output for 4.3.0 - 4.3.1
Warning: main(inc/header.php) [http://www.php.net/function.main]: failed to create stream: No such file or directory in /in/WrStE on line 11 Warning: main() [http://www.php.net/function.main]: Failed opening 'inc/header.php' for inclusion (include_path='.:') in /in/WrStE on line 11 Warning: main(pages.php) [http://www.php.net/function.main]: failed to create stream: No such file or directory in /in/WrStE on line 14 Warning: main() [http://www.php.net/function.main]: Failed opening 'pages.php' for inclusion (include_path='.:') in /in/WrStE on line 14 404 Warning: main(inc/footer.php) [http://www.php.net/function.main]: failed to create stream: No such file or directory in /in/WrStE on line 19 Warning: main() [http://www.php.net/function.main]: Failed opening 'inc/footer.php' for inclusion (include_path='.:') in /in/WrStE on line 19