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); } echo "end"; exit; 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 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, 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
end
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 end
Output for 5.2.3 - 5.2.17
Parse error: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or '(' in /in/OuMhY on line 35
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/OuMhY</b> on line <b>35</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/OuMhY</b> on line <b>35</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/OuMhY</b> on line <b>35</b><br />
Process exited with code 255.

preferences:
310.82 ms | 401 KiB | 467 Q