3v4l.org

run code in 300+ PHP versions simultaneously
<?php defined('CMS_TA') or die; namespace App\Controllers; use App\Core\Flash; // use App\core\Messages; // use flight\Flight; class Controller { protected $tmpl; protected $inst; protected $title; protected $data; protected $errors = []; protected $msg; protected $multi = []; public function __construct($instanca= null){ $this->msg = $instanca->flash_data(); $this->flash = $instanca->flash_msg(); $this->inst= $instanca; } protected function view() { // header tmpl $this->inst->render('tmpl/header', [ 'title' => $this->title, 'base' => $this->inst->request()->base, 'flash' => $this->flash::display(), ]); // content tmpl $this->inst->render($this->tmpl, [ 'data'=>$this->data, 'errors'=>$this->errors, ]); // footer tmpl $this->inst->render('tmpl/footer'); } }

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.1.70.0370.00915.12
7.1.60.0400.01832.91
7.1.50.0410.00332.93
7.1.40.0420.01332.48
7.1.30.1370.01732.59
7.1.20.0400.00632.57
7.1.10.0290.00614.48
7.1.00.0230.00314.72
7.0.200.0180.01014.68
7.0.190.0190.00614.69
7.0.180.0240.00914.13
7.0.170.0180.01114.10
7.0.160.0150.00913.97
7.0.150.0210.00414.19
7.0.140.0210.01814.18
7.0.130.0240.01014.67
7.0.120.0200.01014.39
7.0.110.0170.00714.39
7.0.100.0220.00914.25
7.0.90.0230.01414.22
7.0.80.0240.01214.32
7.0.70.0170.01014.30
7.0.60.0220.00913.88
7.0.50.0190.00614.28
7.0.40.0260.00714.56
7.0.30.0150.01114.68
7.0.20.0190.01014.33
7.0.10.0220.00314.50
7.0.00.0140.01014.46

preferences:
131.94 ms | 1394 KiB | 7 Q