3v4l.org

run code in 300+ PHP versions simultaneously
<?php class App { public function __construct() { $this->db = new Db(); $this->engine = new Twig(); } public function run($request) { return (new Router( new Endpoint('/foo', new FooController($this->twig, /* Services, Repos, etc */)), new Endpoint('/bar', new BarController($this->twig, /* Services, Repos, etc */)), new Endpoint('/baz', new BazController($this->twig, /* Services, Repos, etc */)), // ... etc ))->route($request); } } class Controller { public function __construct(Engine $engine, /* ... */) { $this->engine = $engine; } public function response() { return new Response(..., $this->engine->render('/file', $data)); } }

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.2.30.0100.01017.68
7.2.20.0090.01017.56
7.2.10.0120.01717.55
7.2.00.0130.01617.71
7.1.150.0130.01116.50
7.1.140.0150.01116.39
7.1.130.0110.01516.60
7.1.120.0100.01616.52
7.1.110.0100.01215.83
7.1.100.0110.01115.91
7.1.90.0130.01315.56
7.1.80.0110.00815.99
7.1.70.0060.01115.17
7.1.60.0400.01332.88
7.1.50.0330.01032.96
7.1.40.0270.01432.48
7.1.30.0360.01932.46
7.1.20.0300.01032.51
7.1.10.0090.00914.53
7.1.00.0130.00614.70

preferences:
143.8 ms | 1394 KiB | 7 Q