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.40.0110.00318.70
8.3.30.0000.01419.11
8.3.20.0070.00020.00
8.3.10.0070.00023.66
8.3.00.0040.00419.09
8.2.170.0130.00622.96
8.2.160.0140.00020.39
8.2.150.0040.00424.18
8.2.140.0000.00724.66
8.2.130.0070.01426.16
8.2.120.0070.00322.10
8.2.110.0060.00322.25
8.2.100.0090.00317.78
8.2.90.0060.00318.98
8.2.80.0080.00017.97
8.2.70.0040.00417.38
8.2.60.0040.00417.80
8.2.50.0000.01218.07
8.2.40.0060.00318.03
8.2.30.0080.00017.98
8.2.20.0000.00817.61
8.2.10.0080.00017.80
8.2.00.0060.00317.47
8.1.270.0000.00823.88
8.1.260.0040.00426.35
8.1.250.0030.00528.09
8.1.240.0030.00623.83
8.1.230.0080.00419.09
8.1.220.0040.00417.74
8.1.210.0060.00318.77
8.1.200.0050.00517.23
8.1.190.0050.00317.40
8.1.180.0000.01118.89
8.1.170.0040.00418.49
8.1.160.0040.00421.93
8.1.150.0080.00018.56
8.1.140.0000.00717.32
8.1.130.0050.00217.76
8.1.120.0000.00717.36
8.1.110.0000.00817.33
8.1.100.0050.00317.34
8.1.90.0070.00017.33
8.1.80.0040.00417.35
8.1.70.0000.00817.20
8.1.60.0040.00417.48
8.1.50.0000.00817.31
8.1.40.0000.00717.29
8.1.30.0040.00417.51
8.1.20.0000.00817.50
8.1.10.0040.00417.37
8.1.00.0030.00617.18
8.0.300.0040.00418.77
8.0.290.0050.00317.05
8.0.280.0030.00318.17
8.0.270.0070.00017.16
8.0.260.0060.00017.04
8.0.250.0000.00716.79
8.0.240.0040.00416.78
8.0.230.0000.00716.76
8.0.220.0000.00716.89
8.0.210.0030.00316.73
8.0.200.0040.00416.75
8.0.190.0080.00016.78
8.0.180.0000.00816.86
8.0.170.0040.00416.75
8.0.160.0050.00316.88
8.0.150.0060.00616.81
8.0.140.0050.00216.65
8.0.130.0030.00313.30
8.0.120.0000.00716.77
8.0.110.0040.00416.71
8.0.100.0040.00416.72
8.0.90.0040.00416.69
8.0.80.0080.00816.80
8.0.70.0030.00316.86
8.0.60.0030.00616.73
8.0.50.0070.00016.88
8.0.30.0070.01116.91
8.0.20.0070.01117.40
8.0.10.0040.00416.83
8.0.00.0100.00816.60
7.4.330.0050.00015.00
7.4.320.0030.00316.67
7.4.300.0000.00616.50
7.4.290.0030.00316.54
7.4.280.0000.00716.52
7.4.270.0000.00716.63
7.4.260.0050.00316.58
7.4.250.0060.00316.53
7.4.240.0000.00716.61
7.4.230.0000.00816.50
7.4.220.0080.00816.66
7.4.210.0040.01116.64
7.4.200.0070.00016.71
7.4.190.0050.00216.71
7.4.160.0120.00416.40
7.4.150.0110.00717.40
7.4.140.0160.00117.86
7.4.130.0140.00616.48
7.4.120.0080.00916.52
7.4.110.0160.00316.58
7.4.100.0060.01116.42
7.4.90.0030.01316.60
7.4.80.0170.00619.39
7.4.70.0060.01616.48
7.4.60.0070.01016.27
7.4.50.0030.00616.28
7.4.40.0100.00622.77
7.4.30.0090.00616.51
7.4.00.0060.01014.96
7.3.330.0050.00013.33
7.3.320.0000.00513.46
7.3.310.0040.00416.33
7.3.300.0000.00816.31
7.3.290.0110.00316.41
7.3.280.0100.00816.42
7.3.270.0160.00417.40
7.3.260.0150.01116.41
7.3.250.0090.00916.40
7.3.240.0110.00816.36
7.3.230.0140.00316.39
7.3.210.0100.00616.30
7.3.200.0110.00719.39
7.3.190.0090.00916.53
7.3.180.0090.00616.38
7.3.170.0110.00516.67
7.3.160.0140.00416.41
7.3.120.0040.00814.83
7.2.330.0230.00016.51
7.2.320.0100.01016.48
7.2.310.0080.00816.34
7.2.300.0100.00716.71
7.2.290.0070.01416.35
7.2.80.0030.01316.46
7.2.60.0030.01216.94
7.2.00.0030.00919.55
7.1.200.0070.00415.82
7.1.100.0060.00618.04
7.1.70.0000.01017.16
7.1.60.0130.00619.46
7.1.50.0070.01816.58
7.1.00.0070.07022.38
7.0.200.0030.00316.41
7.0.140.0070.06722.04
7.0.60.0130.08019.95
7.0.50.0070.06017.91
7.0.40.0100.08020.25
7.0.30.0500.06720.16
7.0.20.0430.07020.17
7.0.10.0000.06020.14
7.0.00.0030.08720.08
5.6.280.0030.07321.11
5.6.210.0070.04020.68
5.6.200.0130.07718.23
5.6.190.0170.04320.45
5.6.180.0270.03720.62
5.6.170.0130.05320.41
5.6.160.0030.07720.49
5.6.150.0030.04018.30
5.6.140.0100.06018.25
5.6.130.0100.08318.20
5.6.120.0000.08021.03
5.6.110.0070.05021.04
5.6.100.0070.06020.98
5.6.90.0000.04321.01
5.6.80.0100.04720.38
5.6.70.4370.04020.46
5.5.350.0170.06320.39
5.5.340.0030.05717.98
5.5.330.0000.04720.41
5.5.320.0100.08720.32
5.5.310.0230.04720.26
5.5.300.0030.04018.09
5.5.290.0030.04318.05
5.5.280.0100.03720.79
5.5.270.0100.05720.99
5.5.260.0100.08720.78
5.5.250.0100.08320.79
5.5.240.0200.03320.23
5.4.450.0030.06319.17
5.4.440.0200.06319.31
5.4.430.0300.05019.34
5.4.420.0270.06719.61
5.4.410.0370.04719.33
5.4.400.0200.05018.99
5.4.390.0300.05319.16
5.4.380.0430.06018.80
5.4.370.0230.05318.71
5.4.360.0330.04718.62
5.4.350.0230.05718.71
5.4.340.0270.05018.52
5.4.320.0080.04012.53
5.4.310.0050.04312.53
5.4.300.0080.03512.54
5.4.290.0100.03512.52
5.4.280.0120.05212.40
5.4.270.0090.04612.40
5.4.260.0130.06112.40
5.4.250.0160.09412.39
5.4.240.0060.04212.39
5.4.230.0080.05512.39
5.4.220.0070.04612.39
5.4.210.0070.07012.39
5.4.200.0160.08812.39
5.4.190.0130.06612.39
5.4.180.0100.07412.39
5.4.170.0080.04912.39
5.4.160.0090.05112.39
5.4.150.0100.03512.39
5.4.140.0100.03812.07
5.4.130.0090.04912.06
5.4.120.0300.04912.02
5.4.110.0140.06712.02
5.4.100.0200.05712.02
5.4.90.0270.08312.01
5.4.80.0070.07212.02
5.4.70.0090.05212.01
5.4.60.0090.03712.01
5.4.50.0120.07312.01
5.4.40.0200.11412.00
5.4.30.0180.07612.00
5.4.20.0420.12312.00
5.4.10.0070.06812.00
5.4.00.0070.06311.49
5.3.290.0080.04012.80
5.3.280.0360.08412.71
5.3.270.0160.06812.72
5.3.260.0130.06812.71
5.3.250.0070.07512.72
5.3.240.0130.06612.72
5.3.230.0140.04612.71
5.3.220.0150.05012.68
5.3.210.0220.07612.68
5.3.200.0150.05912.68
5.3.190.0210.06012.68
5.3.180.0130.07512.67
5.3.170.0130.07412.66
5.3.160.0110.05212.68
5.3.150.0550.08912.68
5.3.140.0230.07012.66
5.3.130.0130.05012.66
5.3.120.0200.08312.66
5.3.110.0310.08512.65
5.3.100.0260.07912.13
5.3.90.0140.06612.11
5.3.80.0070.06012.10
5.3.70.0240.07212.11
5.3.60.0160.04912.08
5.3.50.0140.05612.03
5.3.40.0240.09812.03
5.3.30.0230.10711.99
5.3.20.0170.07911.78
5.3.10.0150.05811.73
5.3.00.0220.06511.72
5.2.170.0120.0929.22
5.2.160.0230.0889.21
5.2.150.0250.0949.22
5.2.140.0070.0369.21
5.2.130.0250.1209.17
5.2.120.0090.0479.18
5.2.110.0110.0569.18
5.2.100.0130.0459.18
5.2.90.0140.0459.18
5.2.80.0090.0529.18
5.2.70.0160.0589.18
5.2.60.0120.0479.13
5.2.50.0150.0519.10
5.2.40.0140.0459.07
5.2.30.0140.0589.06
5.2.20.0180.0549.05
5.2.10.0180.0558.96
5.2.00.0170.0638.82
5.1.60.0090.0368.11
5.1.50.0050.0338.11
5.1.40.0110.0328.08
5.1.30.0080.0408.43
5.1.20.0100.0438.45
5.1.10.0070.0298.18
5.1.00.0050.0328.18
5.0.50.0040.0266.65
5.0.40.0170.0356.52
5.0.30.0080.0446.33
5.0.20.0200.0396.29
5.0.10.0060.0276.28
5.0.00.0100.0416.26
4.4.90.0070.0194.78
4.4.80.0080.0224.76
4.4.70.0060.0214.76
4.4.60.0060.0214.75
4.4.50.0040.0264.77
4.4.40.0080.0354.71
4.4.30.0040.0264.76
4.4.20.0060.0254.85
4.4.10.0040.0274.85
4.4.00.0060.0364.76
4.3.110.0050.0314.66
4.3.100.0020.0274.66
4.3.90.0080.0254.64
4.3.80.0030.0354.59
4.3.70.0050.0304.63
4.3.60.0060.0304.63
4.3.50.0000.0334.63
4.3.40.0060.0324.54
4.3.30.0050.0213.29
4.3.20.0020.0183.27
4.3.10.0030.0213.24
4.3.00.0070.01710.30

preferences:
31.93 ms | 400 KiB | 5 Q