3v4l.org

run code in 300+ PHP versions simultaneously
<?php // index.php //require(baseController.php); //require(basemodel.php); //require(header.php); // baseController.php class baseController { function __construct() { } function echoView($view) { $this->view->render('views/header');// go to view controller and use the render method to echo view.php view. } } // basemodel.php class baseModel { function __construct() { // acces db with new db(); } public function userList() { $query = $this->db->prepare('SELECET....'); $query->execute(); return $query->fetchAll(); } } //view.php //<p>This is a view!</p> //header.php //<header></header> // controller methods operate models // userController.php class userController { function __construct() { parent::baseController; } function edit($i) { $tis->view->user = $this->model->userList(); $this->view->render(user/edit); } } // model methods operate on the database // usermodel.php class userModel extends baseModel{ function __construct() { parent::__construct(); } public function userList() { $query = $this->db->prepare('SELECET users FROM...'); $query->execute(); return $query->fetchAll(); } }

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.0110.00416.50
8.3.50.0120.00522.12
8.3.40.0040.01118.79
8.3.30.0140.00718.92
8.3.20.0050.00220.20
8.3.10.0050.00323.78
8.3.00.0000.00819.26
8.2.180.0170.00316.75
8.2.170.0000.01422.96
8.2.160.0110.00420.53
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0130.00626.16
8.2.120.0080.00021.03
8.2.110.0050.00521.95
8.2.100.0060.00617.91
8.2.90.0060.00319.11
8.2.80.0000.00817.97
8.2.70.0030.00517.38
8.2.60.0050.00317.91
8.2.50.0000.01018.07
8.2.40.0090.00018.22
8.2.30.0080.00018.00
8.2.20.0000.00817.62
8.2.10.0060.00317.99
8.2.00.0030.00717.61
8.1.280.0110.00425.92
8.1.270.0090.00023.97
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0100.00023.91
8.1.230.0040.00719.10
8.1.220.0050.00317.74
8.1.210.0040.00418.77
8.1.200.0030.00617.10
8.1.190.0040.00417.40
8.1.180.0040.00419.01
8.1.170.0030.00518.59
8.1.160.0070.00021.98
8.1.150.0000.00718.42
8.1.140.0040.00417.20
8.1.130.0000.00717.70
8.1.120.0000.00717.23
8.1.110.0040.00417.36
8.1.100.0000.00717.30
8.1.90.0000.00717.34
8.1.80.0000.00717.34
8.1.70.0000.00717.29
8.1.60.0030.00517.45
8.1.50.0060.00317.40
8.1.40.0000.00817.35
8.1.30.0060.00317.37
8.1.20.0040.00417.48
8.1.10.0000.00817.40
8.1.00.0080.00017.33
8.0.300.0070.00018.77
8.0.290.0000.00717.05
8.0.280.0040.00418.31
8.0.270.0040.00417.12
8.0.260.0030.00317.05
8.0.250.0040.00416.92
8.0.240.0040.00416.76
8.0.230.0030.00316.87
8.0.220.0030.00316.80
8.0.210.0030.00316.82
8.0.200.0020.00516.79
8.0.190.0040.00416.77
8.0.180.0000.00716.75
8.0.170.0030.00516.75
8.0.160.0040.00416.87
8.0.150.0050.00316.81
8.0.140.0080.00016.81
8.0.130.0030.00313.27
8.0.120.0000.00716.88
8.0.110.0000.00716.77
8.0.100.0070.00016.69
8.0.90.0070.00016.80
8.0.80.0100.01016.70
8.0.70.0050.00316.77
8.0.60.0050.00216.70
8.0.50.0040.00416.86
8.0.30.0110.01117.08
8.0.20.0080.01317.40
8.0.10.0000.00816.95
8.0.00.0080.01216.62
7.4.330.0000.00515.00
7.4.320.0040.00416.51
7.4.300.0060.00016.57
7.4.290.0030.00316.38
7.4.280.0030.00316.27
7.4.270.0050.00316.47
7.4.260.0030.00316.48
7.4.250.0000.00816.21
7.4.240.0020.00516.39
7.4.230.0030.00316.43
7.4.220.0000.01616.37
7.4.210.0090.00516.47
7.4.200.0000.00716.50
7.4.190.0000.00716.34
7.4.160.0160.00016.31
7.4.150.0160.00417.40
7.4.140.0100.00817.86
7.4.130.0070.01216.29
7.4.120.0080.01016.43
7.4.110.0120.00616.56
7.4.100.0130.00816.23
7.4.90.0120.00616.49
7.4.80.0090.01319.39
7.4.70.0160.00616.40
7.4.60.0040.01216.37
7.4.50.0030.00516.23
7.4.40.0100.00622.77
7.4.30.0080.00816.41
7.4.00.0070.00714.91
7.3.330.0030.00312.92
7.3.320.0050.00013.06
7.3.310.0030.00316.17
7.3.300.0050.00216.10
7.3.290.0080.00816.20
7.3.280.0120.00716.13
7.3.270.0070.01017.40
7.3.260.0070.01016.24
7.3.250.0050.01216.15
7.3.240.0130.00716.20
7.3.230.0100.00716.39
7.3.210.0090.00616.48
7.3.200.0100.00719.39
7.3.190.0100.00716.52
7.3.180.0070.01016.43
7.3.170.0060.00916.37
7.3.160.0060.01016.22
7.3.120.0080.00614.49
7.2.330.0140.00416.69
7.2.320.0150.00916.31
7.2.310.0070.01716.45
7.2.300.0160.00316.61
7.2.290.0180.00616.36
7.1.200.0100.00315.79
7.1.100.0050.00517.97
7.1.70.0000.00816.93
7.1.60.0100.01019.46
7.1.50.0100.01416.75
7.1.00.0070.07322.57
7.0.200.0090.00016.70
7.0.140.0000.07721.95
7.0.60.0130.07019.95
7.0.50.0070.04717.88
7.0.40.0070.09020.24
7.0.30.0530.05720.20
7.0.20.0400.06320.33
7.0.10.0130.04320.25
7.0.00.0030.04020.22
5.6.280.0070.07021.19
5.6.210.0130.06720.51
5.6.200.0000.06318.15
5.6.190.0000.07720.41
5.6.180.0300.07720.38
5.6.170.0230.07020.52
5.6.160.0170.07320.50
5.6.150.0070.04718.14
5.6.140.0030.08018.18
5.6.130.0070.08718.27
5.6.120.0130.08320.91
5.6.110.0130.08021.02
5.6.100.0070.08021.14
5.6.90.0100.08021.01
5.6.80.0070.03720.39
5.6.70.4370.04020.33
5.5.350.0030.08320.42
5.5.340.0070.06018.04
5.5.330.0070.05020.19
5.5.320.0400.03720.27
5.5.310.0230.05720.37
5.5.300.0100.06318.08
5.5.290.0030.04017.99
5.5.280.0200.07020.75
5.5.270.0000.05020.98
5.5.260.0070.03720.88
5.5.250.0070.08320.79
5.5.240.0270.07320.19
5.4.450.0700.06719.48
5.4.440.0270.05319.30
5.4.430.0170.06019.47
5.4.420.0200.07319.32
5.4.410.0100.07719.45
5.4.400.0170.06019.27
5.4.390.0300.05018.84
5.4.380.0400.07018.74
5.4.370.0330.04718.78
5.4.360.0300.05018.86
5.4.350.0400.05318.75
5.4.340.0400.05018.75
5.4.320.0080.04212.51
5.4.310.0060.04512.52
5.4.300.0060.03612.52
5.4.290.0090.03712.51
5.4.280.0050.04412.38
5.4.270.0080.03812.38
5.4.260.0080.04012.38
5.4.250.0050.04212.38
5.4.240.0090.04912.38
5.4.230.0070.05012.37
5.4.220.0090.05212.37
5.4.210.0090.03712.37
5.4.200.0080.03912.37
5.4.190.0080.05412.37
5.4.180.0080.05312.37
5.4.170.0100.04112.38
5.4.160.0140.03512.38
5.4.150.0070.05412.37
5.4.140.0080.05512.05
5.4.130.0090.05112.04
5.4.120.0130.04712.00
5.4.110.0110.05112.00
5.4.100.0080.06212.00
5.4.90.0080.03812.00
5.4.80.0030.05912.00
5.4.70.0170.04512.00
5.4.60.0100.04912.00
5.4.50.0110.05611.99
5.4.40.0080.05111.98
5.4.30.0070.05011.98
5.4.20.0130.07711.98
5.4.10.0100.04311.98
5.4.00.0090.04611.47
5.3.290.0070.03812.80
5.3.280.0120.05912.71
5.3.270.0110.05812.73
5.3.260.0140.05212.72
5.3.250.0130.05312.72
5.3.240.0080.05712.72
5.3.230.0110.04412.70
5.3.220.0110.05312.68
5.3.210.0080.04112.68
5.3.200.0060.03712.68
5.3.190.0100.04612.68
5.3.180.0110.05312.67
5.3.170.0130.07312.67
5.3.160.0070.05612.67
5.3.150.0150.06912.67
5.3.140.0080.05912.66
5.3.130.0090.03912.66
5.3.120.0090.04012.66
5.3.110.0120.04712.66
5.3.100.0080.04512.12
5.3.90.0090.03912.09
5.3.80.0120.04512.08
5.3.70.0080.04712.08
5.3.60.0070.05012.06
5.3.50.0060.04112.01
5.3.40.0140.05012.01
5.3.30.0100.03711.97
5.3.20.0080.03511.76
5.3.10.0060.03711.72
5.3.00.0050.04011.71
5.2.170.0080.0409.20
5.2.160.0060.0399.20
5.2.150.0050.0329.20
5.2.140.0020.0339.20
5.2.130.0050.0309.16
5.2.120.0090.0399.16
5.2.110.0090.0289.16
5.2.100.0050.0379.17
5.2.90.0090.0379.16
5.2.80.0040.0319.16
5.2.70.0030.0349.16
5.2.60.0090.0459.11
5.2.50.0080.0339.09
5.2.40.0060.0359.06
5.2.30.0090.0449.04
5.2.20.0060.0409.02
5.2.10.0080.0368.93
5.2.00.0080.0328.80
5.1.60.0030.0278.08
5.1.50.0050.0288.08
5.1.40.0080.0268.06
5.1.30.0080.0248.41
5.1.20.0060.0268.43
5.1.10.0060.0268.16
5.1.00.0080.0238.17
5.0.50.0050.0216.63
5.0.40.0050.0236.50
5.0.30.0040.0376.30
5.0.20.0060.0276.28
5.0.10.0040.0306.26
5.0.00.0040.0426.25
4.4.90.0070.0214.78
4.4.80.0080.0204.75
4.4.70.0040.0224.75
4.4.60.0050.0164.75
4.4.50.0040.0234.77
4.4.40.0030.0314.71
4.4.30.0020.0184.76
4.4.20.0040.0244.84
4.4.10.0070.0244.85
4.4.00.0030.0294.76
4.3.110.0040.0254.67
4.3.100.0070.0204.67
4.3.90.0040.0174.63
4.3.80.0040.0254.58
4.3.70.0030.0184.63
4.3.60.0030.0164.63
4.3.50.0050.0224.63
4.3.40.0040.0344.54
4.3.30.0020.0233.29
4.3.20.0050.0373.27
4.3.10.0050.0173.23
4.3.00.0300.01310.30

preferences:
38.24 ms | 401 KiB | 5 Q