3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * Piwik - Open source web analytics * * @link http://piwik.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later * * @package Piwik */ if(!defined('PIWIK_DOCUMENT_ROOT')) { define('PIWIK_DOCUMENT_ROOT', dirname(__FILE__) == '/' ? '' : dirname(__FILE__)); } if (file_exists(PIWIK_DOCUMENT_ROOT . '/bootstrap.php')) { require_once PIWIK_DOCUMENT_ROOT . '/bootstrap.php'; } error_reporting(E_ALL | E_NOTICE); @ini_set('display_errors', defined('PIWIK_DISPLAY_ERRORS') ? PIWIK_DISPLAY_ERRORS : @ini_get('display_errors')); @ini_set('xdebug.show_exception_trace', 0); @ini_set('magic_quotes_runtime', 0); if (!defined('PIWIK_USER_PATH')) { define('PIWIK_USER_PATH', PIWIK_DOCUMENT_ROOT); } if (!defined('PIWIK_INCLUDE_PATH')) { define('PIWIK_INCLUDE_PATH', PIWIK_DOCUMENT_ROOT); } require_once PIWIK_INCLUDE_PATH . '/libs/upgradephp/upgrade.php'; require_once PIWIK_INCLUDE_PATH . '/core/testMinimumPhpVersion.php'; // NOTE: the code above this comment must be PHP4 compatible use Piwik\Error; use Piwik\ExceptionHandler; use Piwik\FrontController; session_cache_limiter('nocache'); @date_default_timezone_set('UTC'); require_once file_exists(PIWIK_INCLUDE_PATH . '/vendor/autoload.php') ? PIWIK_INCLUDE_PATH . '/vendor/autoload.php' // Piwik is the main project : PIWIK_INCLUDE_PATH . '/../../autoload.php'; // Piwik is installed as a dependency require_once PIWIK_INCLUDE_PATH . '/core/Loader.php'; if(!defined('PIWIK_PRINT_ERROR_BACKTRACE')) { define('PIWIK_PRINT_ERROR_BACKTRACE', false); } if (!defined('PIWIK_ENABLE_ERROR_HANDLER') || PIWIK_ENABLE_ERROR_HANDLER) { require_once PIWIK_INCLUDE_PATH . '/core/Error.php'; Error::setErrorHandler(); require_once PIWIK_INCLUDE_PATH . '/core/ExceptionHandler.php'; ExceptionHandler::setUp(); } FrontController::setUpSafeMode(); if (!defined('PIWIK_ENABLE_DISPATCH') || PIWIK_ENABLE_DISPATCH) { $controller = FrontController::getInstance(); $controller->init(); $response = $controller->dispatch(); if (!is_null($response)) { echo $response; } }
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Warning: require_once(/in/libs/upgradephp/upgrade.php): Failed to open stream: No such file or directory in /in/KQRLv on line 30 Fatal error: Uncaught Error: Failed opening required '/in/libs/upgradephp/upgrade.php' (include_path='.:') in /in/KQRLv:30 Stack trace: #0 {main} thrown in /in/KQRLv on line 30
Process exited with code 255.
Output for 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.34, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33
Warning: require_once(/in/libs/upgradephp/upgrade.php): failed to open stream: No such file or directory in /in/KQRLv on line 30 Fatal error: require_once(): Failed opening required '/in/libs/upgradephp/upgrade.php' (include_path='.:') in /in/KQRLv on line 30
Process exited with code 255.
Output for 5.2.3 - 5.2.17
Parse error: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or '(' in /in/KQRLv on line 34
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.1.6, 5.2.0 - 5.2.2
<br /> <b>Parse error</b>: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or '(' in <b>/in/KQRLv</b> on line <b>34</b><br />
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1, 5.0.0 - 5.0.5
<br /> <b>Parse error</b>: parse error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or '(' in <b>/in/KQRLv</b> on line <b>34</b><br />
Process exited with code 255.
Output for 4.3.2 - 4.3.4
<br /> <b>Parse error</b>: parse error, expecting `T_CONSTANT_ENCAPSED_STRING' or `'('' in <b>/in/KQRLv</b> on line <b>34</b><br />
Process exited with code 255.

preferences:
292.01 ms | 401 KiB | 468 Q