3v4l.org

run code in 300+ PHP versions simultaneously
<?php // https://github.com/bcit-ci/CodeIgniter/blob/635256265a38e655c00f4415d5f09700f28c5805/system/core/Common.php#L140 function load_class($class) { return (new $class()); } // https://github.com/bcit-ci/CodeIgniter/blob/b862664f2ce2d20382b9af5bfa4dd036f5755409/system/core/CodeIgniter.php#L316 function &get_instance() { return CI_Controller::get_instance(); } // https://github.com/bcit-ci/CodeIgniter/blob/b862664f2ce2d20382b9af5bfa4dd036f5755409/system/core/Loader.php#L51 class CI_Loader { public function model($model, $name = '', $db_conn = FALSE) { $class = $model.'Model'; $CI =& get_instance(); $CI->{$model} = new $class; } } // https://github.com/bcit-ci/CodeIgniter/blob/b862664f2ce2d20382b9af5bfa4dd036f5755409/system/core/Controller.php#L52 class CI_Controller { private static $instance; /** * Class constructor * * @return void */ public function __construct() { self::$instance =& $this; $this->load =& load_class('CI_Loader'); } /** * Get the CI singleton * * @static * @return object */ public static function &get_instance() { return self::$instance; } } // your models class fooModel { public $foo; } class barModel { public $bar; } // your controller class Controller extends CI_Controller { public function indexAction() { $this->load->model('foo'); $this->load->model('bar'); } } // instance container $app = (new class{}); $app->controller = new Controller(); // loaded by router $app->controller->indexAction(); print_r($app);

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.130.0050.00516.81
8.3.120.0030.00619.08
8.3.110.0080.00816.88
8.3.100.0100.00024.06
8.3.90.0050.00326.77
8.3.80.0090.00318.56
8.3.70.0090.00918.68
8.3.60.0170.00018.68
8.3.50.0140.00318.41
8.3.40.0040.01118.92
8.3.30.0040.01118.92
8.3.20.0000.00721.77
8.3.10.0040.00423.53
8.3.00.0080.00021.97
8.2.250.0040.00416.51
8.2.240.0000.00717.28
8.2.230.0090.00020.94
8.2.220.0100.00037.54
8.2.210.0080.00026.77
8.2.200.0000.00816.75
8.2.190.0120.00317.00
8.2.180.0070.00716.75
8.2.170.0100.00722.96
8.2.160.0100.01019.21
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0080.00019.29
8.2.120.0040.00426.35
8.2.110.0030.00620.48
8.2.100.0100.00318.03
8.2.90.0000.00817.63
8.2.80.0030.00518.76
8.2.70.0000.00817.50
8.2.60.0030.00617.75
8.2.50.0000.00817.63
8.2.40.0000.00820.65
8.2.30.0060.00322.40
8.2.20.0070.00018.12
8.2.10.0000.00818.15
8.2.00.0040.00417.96
8.1.300.0040.01118.31
8.1.290.0000.00930.84
8.1.280.0070.00725.92
8.1.270.0080.00622.02
8.1.260.0030.00526.35
8.1.250.0040.00728.09
8.1.240.0060.00319.02
8.1.230.0040.00722.11
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0030.00617.35
8.1.190.0090.00017.23
8.1.180.0050.00318.10
8.1.170.0000.00818.71
8.1.160.0040.00418.90
8.1.150.0040.00420.19
8.1.140.0000.00817.64
8.1.130.0080.00019.04
8.1.120.0000.00717.38
8.1.110.0000.00817.36
8.1.100.0040.00417.40
8.1.90.0040.00317.49
8.1.80.0060.00317.50
8.1.70.0030.00317.39
8.1.60.0080.00017.56
8.1.50.0040.00417.43
8.1.40.0040.00417.46
8.1.30.0040.00417.51
8.1.20.0080.00017.66
8.1.10.0040.00417.43
8.1.00.0000.00817.57
8.0.300.0080.00018.77
8.0.290.0000.00716.88
8.0.280.0000.00818.38
8.0.270.0050.00317.23
8.0.260.0000.00717.02
8.0.250.0000.00717.02
8.0.240.0000.00817.06
8.0.230.0030.00317.07
8.0.220.0030.00316.97
8.0.210.0030.00316.94
8.0.200.0040.00417.04
8.0.190.0070.00017.06
8.0.180.0030.00416.96
8.0.170.0030.00516.91
8.0.160.0040.00416.91
8.0.150.0080.00016.80
8.0.140.0000.00716.98
8.0.130.0000.00613.36
8.0.120.0060.00316.92
8.0.110.0080.00016.85
8.0.100.0000.00816.88
8.0.90.0070.00016.87
8.0.80.0090.00617.03
8.0.70.0040.00417.02
8.0.60.0040.00417.10
8.0.50.0000.00716.95
8.0.30.0070.01017.18
8.0.20.0060.01617.25
8.0.10.0060.01616.95
8.0.00.0120.00816.93
7.4.330.0050.00015.55
7.4.320.0060.00016.61
7.4.300.0000.00616.61
7.4.290.0030.00516.63
7.4.280.0040.00416.54
7.4.270.0080.00316.62
7.4.260.0000.00716.59
7.4.250.0000.00816.45
7.4.240.0040.00316.45
7.4.230.0030.00316.59
7.4.220.0040.00416.63
7.4.210.0150.00416.71
7.4.200.0030.00316.73
7.4.160.0020.01416.49
7.4.150.0090.00916.64
7.4.140.0120.00817.64
7.4.130.0070.01116.51
7.4.120.0100.00816.52
7.4.110.0070.01116.39
7.4.100.0060.01216.72
7.4.90.0110.01116.52
7.4.80.0160.00617.97
7.4.70.0120.00516.64
7.4.60.0080.00816.45
7.4.50.0070.00816.51
7.4.40.0100.00716.60
7.4.30.0190.00616.46
7.4.20.0120.00816.59
7.4.10.0160.00716.59
7.4.00.0080.01115.62
7.3.330.0080.00013.47
7.3.320.0000.00613.38
7.3.310.0000.00716.35
7.3.300.0070.00016.36
7.3.290.0030.00316.32
7.3.280.0090.01016.46
7.3.270.0100.00716.37
7.3.260.0130.00716.46
7.3.250.0090.00916.38
7.3.240.0100.00816.50
7.3.230.0130.00616.44
7.3.220.0100.00716.33
7.3.210.0090.01116.61
7.3.200.0110.00516.43
7.3.190.0070.01016.55
7.3.180.0130.00616.30
7.3.170.0070.01216.53
7.3.160.0080.00816.42
7.3.150.0130.00616.48
7.3.140.0090.00916.21
7.3.130.0090.00916.23
7.3.120.0130.00315.65
7.3.110.0100.00815.48
7.3.100.0090.00615.73
7.3.90.0060.00815.55
7.3.80.0090.00715.56
7.3.70.0080.00915.63
7.3.60.0070.00915.48
7.3.50.0120.00515.61
7.3.40.0070.00815.51
7.3.30.0080.00715.40
7.3.20.0090.01116.33
7.3.10.0080.01216.45
7.3.00.0130.00316.24
7.2.340.0230.00016.19
7.2.330.0140.00916.41
7.2.320.0140.00616.63
7.2.310.0110.01216.61
7.2.300.0150.00716.75
7.2.290.0130.00816.32
7.2.280.0170.00716.43
7.2.270.0160.01616.34
7.2.260.0190.00816.20
7.2.250.0090.01115.57
7.2.240.0110.01015.95
7.2.230.0100.00915.69
7.2.220.0110.01015.45
7.2.210.0090.00815.59
7.2.200.0120.00615.64
7.2.190.0110.00715.55
7.2.180.0140.00315.67
7.2.170.0100.00715.42
7.2.160.0140.01016.41
7.2.150.0200.01016.56
7.2.140.0110.01116.72
7.2.130.0120.01216.38
7.2.120.0250.00016.15
7.2.110.0160.01016.39
7.2.100.0110.01416.69
7.2.90.0170.01416.26
7.2.80.0280.00016.32
7.2.70.0200.00316.36
7.2.60.0140.00616.82
7.2.50.0210.00516.33
7.2.40.0160.00816.42
7.2.30.0090.01518.08
7.2.20.0100.01318.01
7.2.10.0090.01117.99
7.2.00.0120.00817.99
7.1.330.0110.00515.71
7.1.320.0050.01115.85
7.1.310.0250.00915.67
7.1.300.0070.01015.85
7.1.290.0070.00715.64
7.1.280.0040.00915.76
7.1.270.0140.00115.67
7.1.260.0110.00615.58
7.1.250.0090.01215.71
7.1.240.0110.00715.69
7.1.230.0240.01215.58
7.1.220.0140.00515.56
7.1.210.0170.00315.54
7.1.200.0090.00515.69
7.1.190.0140.00315.55
7.1.180.0170.00615.66
7.1.170.0150.00915.66
7.1.160.0070.01315.75
7.1.150.0100.01017.00
7.1.140.0100.00817.12
7.1.130.0070.01017.08
7.1.120.0110.00617.02
7.1.110.0080.01216.64
7.1.100.0110.00916.72
7.1.90.0110.00516.82
7.1.80.0080.00816.70
7.1.70.0070.00916.33
7.1.60.0200.00825.45
7.1.50.0160.00925.08
7.1.40.0140.01225.07
7.1.30.0190.00825.13
7.1.20.0230.01525.01
7.1.10.0060.01316.12
7.1.00.0060.01316.26
7.0.330.0090.00915.38
7.0.320.0150.00515.40
7.0.310.0110.00615.12
7.0.300.0030.01415.07
7.0.290.0120.00615.12
7.0.280.0120.01215.11
7.0.270.0310.01415.09
7.0.260.0120.00415.11
7.0.250.0100.00715.25
7.0.240.0090.00915.30
7.0.230.0120.00615.11
7.0.220.0100.00615.30
7.0.210.0070.01015.09
7.0.200.0130.00315.42
7.0.190.0130.00715.16
7.0.180.0070.01415.41
7.0.170.0070.01015.32
7.0.160.0100.01015.30
7.0.150.0150.00615.30
7.0.140.0100.00815.33
7.0.130.0120.00615.36
7.0.120.0040.01315.32
7.0.110.0110.00715.31
7.0.100.0130.00715.39
7.0.90.0110.00815.36
7.0.80.0130.00315.43
7.0.70.0130.00315.35
7.0.60.0090.00915.14
7.0.50.0120.00915.10
7.0.40.0090.01215.12
7.0.30.0040.01515.17
7.0.20.0170.00015.25
7.0.10.0060.01215.12
7.0.00.0140.00315.08
5.6.400.0100.01015.44
5.6.390.0170.00315.60
5.6.380.0120.00815.73
5.6.370.0090.01115.70
5.6.360.0110.00815.76
5.6.350.0120.00615.89
5.6.340.0070.01315.13
5.6.330.0070.01115.64
5.6.320.0030.01615.28
5.6.310.0140.00515.88
5.6.300.0130.00615.65
5.6.290.0150.00615.52
5.6.280.0070.01115.73
5.6.270.0070.01115.81
5.6.260.0190.00615.93
5.6.250.0150.00615.57
5.6.240.0070.01115.99
5.6.230.0120.00615.48
5.6.220.0100.01015.62
5.6.210.0030.01515.45
5.6.200.0090.00915.61
5.6.190.0070.01415.42
5.6.180.0120.00615.59
5.6.170.0060.01215.20
5.6.160.0100.01015.60
5.6.150.0090.00915.61
5.6.140.0040.01815.71
5.6.130.0100.01015.53
5.6.120.0030.01615.63
5.6.110.0070.01115.60
5.6.100.0060.01215.65
5.6.90.0110.01115.52
5.6.80.0100.01015.60
5.6.70.0090.01215.65
5.6.60.0110.01115.51
5.6.50.0100.01015.56
5.6.40.0120.00615.65
5.6.30.0080.01315.45
5.6.20.0130.00715.71
5.6.10.0110.01115.56
5.6.00.0130.00715.66

preferences:
29.99 ms | 403 KiB | 5 Q