3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Services { protected $services = []; public function getService($id, callback $creator) { // Нет в кэше? Берём из creator'а // Возвращаем кэш } } class Framework extends Services { protected $instance = null; public function __construct() { // Что-то } public static function getInstance() { if (is_null(static::$instance)) { throw new \Exception('Не инициализировано'); } return static::$instance; } public static function getRouter() { return static::getInstance()->getService('framework.router', function() use ($something) { return new Router($something); }) } public static function init() { static::$instance = new static; } public function run() { // Маршрутизация => Контроллер => Выполнение Response } } class CMS extends Framework { public static function getModulesManager() { return static::getInstance()->getService('cms.modulesmanager', function() use ($a, $b, $c) { return new ModulesManager($a, $b, $c) } } public function run() { // Маршрутизация => Встроенные контроллеры/Модули => Выполнение Response } } // based on framework Framework::init() && Framework::run(); // based on CMS CMS::init() && CMS::run();

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
7.0.00.0100.08020.10
5.6.160.0070.08320.61
5.6.150.0100.06318.18
5.6.140.0030.04018.20
5.6.130.0070.08318.18
5.6.120.0030.04021.03
5.6.110.0030.08321.02
5.6.100.0100.07320.99
5.6.90.0030.04720.98
5.6.80.0070.06020.37
5.5.300.0100.07717.94
5.5.290.0100.07317.94
5.5.280.0030.09020.89
5.5.270.0100.07720.80
5.5.260.0130.08020.66
5.5.250.0130.08020.71
5.5.240.0200.07020.38

preferences:
141.87 ms | 1394 KiB | 7 Q