3v4l.org

run code in 300+ PHP versions simultaneously
<?php ini_set("display_errors", true); ini_set("error_reporting", E_ALL ^ E_STRICT); ini_set("html_errors", true); $_structure = array(); $_post_modules = array(); $_message = array(); $_warning = array(); $_notice = array(); $_config = array(); $_locale = array(); $_route = array(); $_error = array(); $_user = array(); $_data = array(); $_sys = array(); $_uri = array(); $_start = explode(" ", microtime()); $_sys['load'][] = $_start[1] + $_start[0]; unset($_start); $_sys['root'] = $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR; if ($_SERVER['SERVER_PORT'] == 80) { $_sys['protocol'] = "http"; } else { $_sys['protocol'] = "https"; } $_uri = urldecode($_SERVER['REQUEST_URI']); if ($_uri[0] == "/") { $_uri = explode("/", $_uri); $_uri = array_slice($_uri, 1); } else { $_uri[0] = null; } if ($_SERVER['HTTP_HOST'] != $_SERVER['SERVER_NAME']) { $_sys['error'] = true; $_sys['redirect'] = $_sys['protocol'] . "://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']; } $_sys['index'] = "index"; $_sys['ext'] = ".php"; $_sys['template'] = "_template"; $_sys['config'] = "_inc.config"; $_sys['locale'] = "_locale"; $_sys['structure'] = "_structure"; $_sys['functions'] = "_functions"; $_sys['posts'] = "_post"; $_sys['cookies'] = "_cookie"; $_sys['core'] = "_core"; $_sys['request'] = "_request"; $_sys[404] = "_404"; $_sys['error'] = false; $_sys['access_level'] = "_public"; $_sys['include_method'] = null; require($_sys['root'] . $_sys['config'] . $_sys['ext']); if (strpos($_SERVER['HTTP_HOST'], ".")) { $_temp = explode(".", $_SERVER['HTTP_HOST']); $_temp = array_shift($_temp); } else { $_temp = $_sys['index']; } require($_sys['root'] . DIRECTORY_SEPARATOR . $_sys['locale'] . DIRECTORY_SEPARATOR . $_sys['index'] . $_sys['ext']); if (isset($_sys['locale_index'][$_temp])) { if ($_sys['locale_index'][$_temp]) { $_sys['language'] = $_temp; } else { $_sys['language'] = $_sys['index']; } } else { $_sys['language'] = $_sys['index']; } unset($_temp); require($_sys['root'] . $_sys['locale'] . DIRECTORY_SEPARATOR . $_sys['language'] . DIRECTORY_SEPARATOR . $_sys['index'] . $_sys['ext']); require($_sys['root'] . $_sys['structure'] . DIRECTORY_SEPARATOR . $_sys['language'] . DIRECTORY_SEPARATOR . $_sys['index'] . $_sys['ext']); $_structure_reverse[] = array_flip($_structure[0]); require($_sys['root'] . $_sys['functions'] . DIRECTORY_SEPARATOR . $_sys['index'] . $_sys['ext']); //cookie operations if (!empty($_COOKIE)) { require($_sys['root'] . $_sys['cookies'] . DIRECTORY_SEPARATOR . $_sys['index'] . $_sys['ext']); } //core operations if (!$_sys['error'] && !isset($_sys['redirect'])) { $_data['html']['title'] = null; $_data['html']['meta']['keywords'] = null; $_data['html']['meta']['description'] = null; foreach ($_uri AS $_uri_index => $_uri_value) { if (isset($_structure[$_uri_index][$_uri_value])) { $_route[$_uri_index] = $_structure[$_uri_index][$_uri_value]; } else { if (!empty($_uri[$_uri_index])) { $_route[$_uri_index] = $_sys['request']; } else { $_route[$_uri_index] = $_sys['index']; } } $_sys['include_method'] .= $_sys['core'] . DIRECTORY_SEPARATOR . $_route[$_uri_index] . DIRECTORY_SEPARATOR; require($_sys['root'] . $_sys['include_method'] . $_sys['structure'] . DIRECTORY_SEPARATOR . $_sys['language'] . DIRECTORY_SEPARATOR . $_sys['index'] . $_sys['ext']); require($_sys['root'] . $_sys['include_method'] . $_sys['functions'] . DIRECTORY_SEPARATOR . $_sys['index'] . $_sys['ext']); require($_sys['root'] . $_sys['include_method'] . $_sys['index'] . $_sys['ext']); if ($_sys['error']) { unset($_route[$_uri_index]);//TODO analysis $_sys['redirect'] = null; foreach ($_route AS $_route_key => $_route_value) { $_sys['redirect'] .= "/" . $_uri[$_route_key]; } } else { if (isset($_structure[$_uri_index][$_uri_value])) { $_data['html']['title'] .= (empty($_data['html']['title']) ? null : " :: ") . ucfirst($_uri_value); $_data['html']['meta']['keywords'] = ucfirst($_uri_value) . ", "; $_data['html']['meta']['description'] = ucfirst($_uri_value) . " "; } } } } //post operations if (!$_sys['error'] && !isset($_sys['redirect']) && $_SERVER['REQUEST_METHOD'] == "POST" && !empty($_POST)) { require($_sys['root'] . $_sys['include_method'] . $_sys['posts'] . DIRECTORY_SEPARATOR . $_sys['index'] . $_sys['ext']); foreach ($_POST as $_post_key => $_post_value) { if (isset($_config['modules'][$_post_key]) && $_config['modules'][$_post_key] && isset($_post_modules[$_post_key]) && isset($_post_modules[$_post_key][$_post_value]) && $_post_modules[$_post_key][$_post_value] == true) { require($_sys['root'] . $_sys['include_method'] . $_sys['posts'] . DIRECTORY_SEPARATOR . $_post_key . DIRECTORY_SEPARATOR . $_sys['index'] . $_sys['ext']); } } } //template or error/redirect operations if (!$_sys['error'] && !isset($_sys['redirect'])) { require($_sys['root'] . $_sys['template'] . DIRECTORY_SEPARATOR . $_sys['index'] . $_sys['ext']); } else { require($_sys['root'] . $_sys[404] . $_sys['ext']); } //developer if ($_SERVER['REMOTE_ADDR'] == "178.56.111.0") { echo "<html><body><hr>debug (" . (memory_get_peak_usage() / 1024) . "KB)<hr><pre>"; print_r(get_required_files()); print_r(get_defined_vars()); //print_r(get_defined_constants()); echo "</pre></body></html>"; } ?>

This is an error 404

There are `0` results


preferences:
1556.03 ms | 1399 KiB | 21 Q