3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @since 3.0.0 * @license http://www.opensource.org/licenses/mit-license.php MIT License */ /** * Cell base. * */ class Cell { /** * Instance of the View created during rendering. Won't be set until after * Cell::__toString() is called. * * @var \Cake\View\View */ public $View; /** * Name of the action that was invoked. * * Action name will be inflected to get the template name when rendering. * * @var string */ public $action; /** * Automatically set to the name of a plugin. * * @var string */ public $plugin = null; /** * An instance of a Cake\Network\Request object that contains information about the current request. * This object contains all the information about a request and several methods for reading * additional information about the request. * * @var \Cake\Network\Request */ public $request; /** * An instance of a Response object that contains information about the impending response * * @var \Cake\Network\Response */ public $response; /** * The name of the View class this cell sends output to. * * @var string */ public $viewClass = 'Cake\View\View'; /** * Instance of the Cake\Event\EventManager this cell is using * to dispatch inner events. * * @var \Cake\Event\EventManager */ protected $_eventManager = null; /** * These properties are settable directly on Cell and passed to the View as options. * * @var array * @see \Cake\View\View */ protected $_validViewOptions = [ 'viewVars', 'helpers', 'viewPath', 'plugin', ]; /** * List of valid options (constructor's fourth arguments) * * @var array */ protected $_validCellOptions = []; /** * Constructor. * * @param \Cake\Network\Request $request * @param \Cake\Network\Response $response * @param \Cake\Event\EventManager $eventManager * @param array $cellOptions */ public function __construct(Request $request = null, Response $response = null, EventManager $eventManager = null, array $cellOptions = []) { $this->_eventManager = $eventManager; $this->request = $request; $this->response = $response; $this->modelFactory('Table', ['Cake\ORM\TableRegistry', 'get']); foreach ($this->_validCellOptions as $var) { if (isset($cellOptions[$var])) { $this->{$var} = $cellOptions[$var]; } } } /** * Rendering method. * * @param string $action Custom template name to render. If not provided (null), the last * value will be used. This value is automatically set by `CellTrait::cell()`. * @return void */ public function render($action = null) { if ($action !== null) { $this->action = $action; } return $this->__toString(); } /** * Magic method. * * Starts the rendering process when Cell is echoed. * * @return string Rendered cell */ public function __toString() { $this->View = $this->createView(); $this->View->layout = false; $className = explode('\\', get_class($this)); $className = array_pop($className); $this->View->subDir = 'Cell' . DS . substr($className, 0, strpos($className, 'Cell')); return $this->bla(Inflector::underscore($this->action)); } public function bla($action) { throw new Exception('Not allowed'); } /** * Debug info. * * @return void */ public function __debugInfo() { return [ 'plugin' => $this->plugin, 'action' => $this->action, 'viewClass' => $this->viewClass, 'request' => $this->request, 'response' => $this->response, ]; } /** * Returns the Cake\Event\EventManager manager instance for this cell. * * You can use this instance to register any new listeners or callbacks to the * cell events, or create your own events and trigger them at will. * * @return \Cake\Event\EventManager */ public function getEventManager() { if (empty($this->_eventManager)) { $this->_eventManager = new EventManager(); } return $this->_eventManager; } }

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)
8.3.60.0100.01018.43
8.3.50.0170.00522.05
8.3.40.0120.00618.84
8.3.30.0070.00718.92
8.3.20.0080.00020.16
8.3.10.0050.00322.11
8.3.00.0050.00322.29
8.2.180.0160.00716.75
8.2.170.0130.00622.96
8.2.160.0130.00320.53
8.2.150.0000.00824.18
8.2.140.0070.00024.66
8.2.130.0140.00326.16
8.2.120.0040.00421.14
8.2.110.0040.00421.99
8.2.100.0040.00719.32
8.2.90.0000.00719.05
8.2.80.0040.00418.04
8.2.70.0000.00817.63
8.2.60.0030.00517.88
8.2.50.0000.00818.07
8.2.40.0030.00518.09
8.2.30.0000.00717.91
8.2.20.0030.00517.61
8.2.10.0040.00417.59
8.2.00.0080.00017.53
8.1.280.0120.00625.92
8.1.270.0030.00622.08
8.1.260.0030.00526.35
8.1.250.0080.00028.09
8.1.240.0060.00323.93
8.1.230.0070.00418.97
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0060.00317.38
8.1.190.0080.00017.28
8.1.180.0060.00318.61
8.1.170.0080.00018.68
8.1.160.0040.00422.05
8.1.150.0080.00018.53
8.1.140.0070.00017.38
8.1.130.0030.00317.71
8.1.120.0040.00417.46
8.1.110.0050.00317.49
8.1.100.0080.00017.39
8.1.90.0040.00417.38
8.1.80.0040.00417.46
8.1.70.0030.00317.32
8.1.60.0060.00617.55
8.1.50.0050.00217.43
8.1.40.0040.00417.54
8.1.30.0050.00317.50
8.1.20.0080.00017.65
8.1.10.0050.00217.38
8.1.00.0050.00317.37
8.0.300.0050.00318.77
8.0.290.0050.00217.16
8.0.280.0000.00718.33
8.0.270.0000.00717.17
8.0.260.0030.00516.78
8.0.250.0060.00316.93
8.0.240.0000.00716.93
8.0.230.0030.00316.88
8.0.220.0000.00816.89
8.0.210.0030.00316.74
8.0.200.0030.00316.90
8.0.190.0040.00416.89
8.0.180.0040.00416.91
8.0.170.0030.00516.88
8.0.160.0050.00316.78
8.0.150.0040.00416.82
8.0.140.0000.00816.78
8.0.130.0090.00013.31
8.0.120.0000.00816.83
8.0.110.0000.00716.91
8.0.100.0050.00216.89
8.0.90.0070.00016.90
8.0.80.0050.01116.91
8.0.70.0070.00016.93
8.0.60.0000.00816.83
8.0.50.0040.00416.79
8.0.30.0110.00816.88
8.0.20.0060.01617.40
8.0.10.0050.00216.81
8.0.00.0110.00816.77
7.4.330.0030.00315.08
7.4.320.0060.00016.52
7.4.300.0040.00416.50
7.4.290.0030.00316.55
7.4.280.0000.00716.39
7.4.270.0030.00516.53
7.4.260.0030.00316.45
7.4.250.0020.00516.34
7.4.240.0080.00016.40
7.4.230.0050.00316.31
7.4.220.0060.01116.47
7.4.210.0100.00616.51
7.4.200.0000.00716.53
7.4.190.0000.00716.64
7.4.160.0060.00916.28
7.4.150.0110.01117.40
7.4.140.0110.00817.86
7.4.130.0110.01116.52
7.4.120.0110.00616.40
7.4.110.0060.01216.47
7.4.100.0100.00716.41
7.4.90.0110.01116.50
7.4.80.0100.01319.39
7.4.70.0120.00916.50
7.4.60.0040.01816.22
7.4.50.0030.00616.42
7.4.40.0090.00622.77
7.4.30.0000.01516.43
7.4.10.0040.01415.11
7.4.00.0060.01014.95
7.3.330.0000.00513.18
7.3.320.0030.00313.21
7.3.310.0040.00416.04
7.3.300.0030.00316.08
7.3.290.0090.00916.22
7.3.280.0080.01116.18
7.3.270.0080.00817.40
7.3.260.0120.00916.45
7.3.250.0070.01016.32
7.3.240.0100.00616.29
7.3.230.0100.00616.39
7.3.210.0100.00716.33
7.3.200.0100.00719.39
7.3.190.0090.01216.38
7.3.180.0070.00716.30
7.3.170.0110.00616.29
7.3.160.0040.01416.16
7.3.130.0090.00914.43
7.3.120.0090.00714.74
7.3.110.0090.00914.72
7.3.100.0040.01014.57
7.3.90.0040.00814.70
7.3.80.0060.01314.82
7.3.70.0030.01214.68
7.3.60.0030.01014.58
7.3.50.0060.00314.69
7.3.40.0090.00614.52
7.3.30.0000.01314.72
7.3.20.0040.00716.31
7.3.10.0070.01416.20
7.3.00.0100.00316.55
7.2.330.0130.00516.34
7.2.320.0090.02016.59
7.2.310.0140.00316.54
7.2.300.0100.00716.13
7.2.290.0040.01416.52
7.2.260.0040.01114.89
7.2.250.0040.01514.76
7.2.240.0100.00314.80
7.2.230.0060.01014.70
7.2.220.0030.01714.96
7.2.210.0070.00714.96
7.2.200.0040.01115.06
7.2.190.0030.01314.83
7.2.180.0090.00014.84
7.2.170.0040.01014.90
7.2.160.0060.01215.02
7.2.150.0070.01416.51
7.2.140.0030.00916.77
7.2.130.0100.00716.75
7.2.120.0060.00916.68
7.2.110.0070.00716.68
7.2.100.0030.01016.73
7.2.90.0030.00616.78
7.2.80.0030.01016.62
7.2.70.0040.00716.61
7.2.60.0070.00716.61
7.2.50.0060.00616.57
7.2.40.0090.00316.83
7.2.30.0090.00616.78
7.2.20.0110.00416.80
7.2.10.0030.00916.49
7.2.00.0040.01117.97
7.1.330.0060.00615.87
7.1.320.0090.00915.46
7.1.310.0000.01315.42
7.1.300.0090.00615.70
7.1.290.0030.00915.66
7.1.280.0070.00715.43
7.1.270.0110.00315.55
7.1.260.0060.00315.53
7.1.250.0060.00615.58
7.1.240.0090.00315.38
7.1.230.0040.00815.71
7.1.220.0030.01315.59
7.1.210.0120.00315.68
7.1.200.0040.01115.51
7.1.190.0100.00715.61
7.1.180.0060.00915.67
7.1.170.0070.00715.36
7.1.160.0040.00715.48
7.1.150.0060.00615.57
7.1.140.0080.00315.59
7.1.130.0070.01015.57
7.1.120.0110.00415.67
7.1.110.0000.01015.57
7.1.100.0080.00716.61
7.1.90.0000.01015.41
7.1.80.0000.01315.69
7.1.70.0030.01216.10
7.1.60.0080.00617.78
7.1.50.0060.00916.30
7.1.40.0040.01115.22
7.1.30.0090.00315.38
7.1.20.0110.00315.59
7.1.10.0030.01015.48
7.1.00.0070.04119.01
7.0.330.0060.00615.29
7.0.320.0030.00715.17
7.0.310.0070.00415.30
7.0.300.0040.01215.34
7.0.290.0030.01015.36
7.0.280.0090.00615.17
7.0.270.0040.01115.18
7.0.260.0000.00815.14
7.0.250.0030.01215.30
7.0.240.0030.01314.93
7.0.230.0030.01015.18
7.0.220.0060.00615.11
7.0.210.0100.00015.23
7.0.200.0050.00815.92
7.0.190.0030.00715.28
7.0.180.0110.00415.35
7.0.170.0000.00915.38
7.0.160.0100.00315.32
7.0.150.0030.01015.34
7.0.140.0000.04318.54
7.0.130.0130.00314.99
7.0.120.0030.00715.19
7.0.110.0040.00815.13
7.0.100.0100.00315.45
7.0.90.0080.00015.00
7.0.80.0070.00715.08
7.0.70.0100.00015.45
7.0.60.0020.05117.58
7.0.50.0000.03016.59
7.0.40.0020.03016.83
7.0.30.0220.03016.71
7.0.20.0100.02716.61
7.0.10.0140.03016.65
7.0.00.0040.02616.69
5.6.400.0060.00314.08
5.6.390.0070.00714.22
5.6.380.0090.00614.04
5.6.370.0160.00014.12
5.6.360.0000.01814.08
5.6.350.0080.00814.56
5.6.340.0040.01114.20
5.6.330.0000.01414.34
5.6.320.0080.00613.94
5.6.310.0130.00014.11
5.6.300.0090.00614.04
5.6.290.0090.00614.45
5.6.280.0130.00314.46
5.6.270.0030.00614.09
5.6.260.0060.01214.22
5.6.250.0060.00914.21
5.6.240.0100.00314.05
5.6.230.0040.00414.19
5.6.220.0090.00614.39
5.6.210.0050.02417.49
5.6.200.0070.02816.23
5.6.190.0080.02117.58
5.6.180.1810.02517.39
5.6.170.0130.03817.28
5.6.160.0030.03017.36
5.6.150.0100.03816.02
5.6.140.0080.04016.13
5.6.130.0070.02416.18
5.6.120.0070.04517.71
5.6.110.0070.05017.68
5.6.100.0090.03917.54
5.6.90.0120.03317.44
5.6.80.0050.04517.21
5.6.70.0230.04017.23
5.6.60.0030.00714.01
5.6.50.0040.01114.14
5.6.40.0000.01114.18
5.6.30.0060.00614.25
5.6.20.0040.00413.96
5.6.10.0100.00614.07
5.6.00.0070.00713.95
5.5.380.0030.01014.00
5.5.370.0030.00613.86
5.5.360.0060.00314.26
5.5.350.0020.03817.34
5.5.340.0120.02515.96
5.5.330.0100.04417.09
5.5.320.0170.02017.20
5.5.310.0170.04117.22
5.5.300.0060.02115.90
5.5.290.0040.04915.94
5.5.280.0070.04617.38
5.5.270.0050.03717.61
5.5.260.0100.02317.46
5.5.250.0070.05117.14
5.5.240.0020.04316.98
5.5.230.0080.00513.89
5.5.220.0000.01114.02
5.5.210.0070.00714.23
5.5.200.0030.00913.84
5.5.190.0060.00914.22
5.5.180.0000.00914.01
5.5.170.0060.00914.13
5.5.160.0060.00314.06
5.5.150.0060.00914.05
5.5.140.0100.00313.91
5.5.130.0070.00713.80
5.5.120.0120.00313.97
5.5.110.0120.00314.16
5.5.100.0070.00714.14
5.5.90.0000.01313.94
5.5.80.0060.00313.75
5.5.70.0050.00514.04
5.5.60.0000.00913.70
5.5.50.0030.00914.10
5.5.40.0060.00914.02
5.5.30.0080.00613.57
5.5.20.0120.00413.79
5.5.10.0000.01514.18
5.5.00.0040.00413.64
5.4.450.0260.03115.79
5.4.440.0380.03215.90
5.4.430.0130.02615.95
5.4.420.0170.02315.92
5.4.410.0020.03515.82
5.4.400.0350.00415.53
5.4.390.0510.00215.48
5.4.380.0140.03315.36
5.4.370.0120.02615.47
5.4.360.0360.02215.50
5.4.350.0080.03215.42
5.4.340.0220.02515.50
5.4.330.0040.00712.22
5.4.320.0080.01912.37
5.4.310.0050.02112.37
5.4.300.0090.02012.37
5.4.290.0090.02112.37
5.4.280.0060.02212.32
5.4.270.0140.02415.58
5.4.260.0050.02815.50
5.4.250.0030.04215.61
5.4.240.0030.03415.61
5.4.230.0150.03515.53
5.4.220.0100.03815.59
5.4.210.0030.04015.49
5.4.200.0070.03015.62
5.4.190.0090.02515.60
5.4.180.0030.03415.59
5.4.170.0130.02315.62
5.4.160.0080.03315.68
5.4.150.0100.02815.60
5.4.140.0110.03314.36
5.4.130.0110.03314.35
5.4.120.0090.03614.40
5.4.110.0090.03714.38
5.4.100.0100.02514.44
5.4.90.0060.02714.31
5.4.80.0050.03614.43
5.4.70.0000.04114.39
5.4.60.0040.02914.30
5.4.50.0080.02914.35
5.4.40.0060.02814.39
5.4.30.0070.03214.35
5.4.20.0030.03114.27
5.4.10.0030.03414.42
5.4.00.0110.02314.00
5.3.290.0060.02112.51
5.3.280.0130.03213.40
5.3.270.0070.03513.41
5.3.260.0030.03113.37
5.3.250.0020.03613.49
5.3.240.0060.03013.47
5.3.230.0080.02813.48
5.3.220.0020.03113.50
5.3.210.0080.03713.40
5.3.200.0150.02613.43
5.3.190.0050.03813.39
5.3.180.0060.02813.40
5.3.170.0030.02913.35
5.3.160.0070.02813.35
5.3.150.0070.03213.44
5.3.140.0090.02913.30
5.3.130.0050.03313.39
5.3.120.0110.02613.43
5.3.110.0050.03013.34
5.3.100.0030.03013.17
5.3.90.0090.03413.19
5.3.80.0050.03513.16
5.3.70.0070.03613.22
5.3.60.0100.03313.10
5.3.50.0080.02813.12
5.3.40.0100.02613.13
5.3.30.0020.03213.11
5.3.20.0050.03712.94
5.3.10.0150.03113.02
5.3.00.0080.03013.04
5.2.170.0030.04710.97
5.2.160.0130.03310.97
5.2.150.0100.05011.21
5.2.140.0000.06311.22
5.2.130.0030.04711.18
5.2.120.0130.05311.28
5.2.110.0030.04711.18
5.2.100.0070.05311.09
5.2.90.0070.05011.18
5.2.80.0130.05311.04
5.2.70.0030.04011.17
5.2.60.0100.04011.00
5.2.50.0130.03311.18
5.2.40.0070.05011.08
5.2.30.0070.04310.87
5.2.20.0000.04311.18
5.2.10.0070.04711.08
5.2.00.0030.04010.70
5.1.60.0070.0409.83
5.1.50.0070.03010.06
5.1.40.0030.04310.03
5.1.30.0030.04710.32
5.1.20.0030.04010.45
5.1.10.0000.04010.22
5.1.00.0100.04310.13
5.0.50.0070.0338.61
5.0.40.0100.0338.47
5.0.30.0100.0378.14
5.0.20.0070.0308.29
5.0.10.0000.0308.13
5.0.00.0030.0538.13
4.4.90.0000.0236.62
4.4.80.0030.0236.62
4.4.70.0000.0276.62
4.4.60.0100.0236.62
4.4.50.0070.0206.62
4.4.40.0100.0406.62
4.4.30.0100.0236.62
4.4.20.0030.0206.62
4.4.10.0030.0236.62
4.4.00.0070.0336.62
4.3.110.0000.0276.62
4.3.100.0030.0306.62
4.3.90.0030.0276.62
4.3.80.0000.0406.62
4.3.70.0000.0206.62
4.3.60.0000.0236.62
4.3.50.0100.0206.62
4.3.40.0030.0436.62
4.3.30.0070.0236.62
4.3.20.0170.0136.62
4.3.10.0030.0206.62
4.3.00.0070.0236.41

preferences:
49.81 ms | 401 KiB | 5 Q