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() { echo "baseController says ". $string ."<br />"; } //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($i) { //$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 extends baseController { function __construct() { parent::baseController($string); } //function edit() { // $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(); } } $home = new baseController("Im in the base"); $home = new userController("Im just a user");

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.01016.73
8.3.50.0110.00321.89
8.3.40.0040.01118.80
8.3.30.0100.00319.09
8.3.20.0040.00420.34
8.3.10.0050.00323.48
8.3.00.0050.00319.26
8.2.180.0120.00616.63
8.2.170.0120.00922.96
8.2.160.0030.01020.35
8.2.150.0000.00724.18
8.2.140.0080.00024.66
8.2.130.0080.00326.16
8.2.120.0050.00322.18
8.2.110.0030.00622.13
8.2.100.0000.01117.84
8.2.90.0000.00819.22
8.2.80.0060.00317.97
8.2.70.0100.00017.63
8.2.60.0040.00417.68
8.2.50.0060.00318.07
8.2.40.0040.00718.22
8.2.30.0040.00417.96
8.2.20.0040.00417.75
8.2.10.0050.00518.05
8.2.00.0030.00717.73
8.1.280.0130.00725.92
8.1.270.0050.00323.91
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0090.00023.67
8.1.230.0070.00418.97
8.1.220.0040.00417.79
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0000.00717.52
8.1.180.0030.00618.10
8.1.170.0000.00818.58
8.1.160.0040.00422.00
8.1.150.0000.00818.55
8.1.140.0000.00817.45
8.1.130.0000.00817.82
8.1.120.0000.00717.37
8.1.110.0040.00417.49
8.1.100.0000.00717.48
8.1.90.0040.00417.35
8.1.80.0000.00717.50
8.1.70.0070.00017.42
8.1.60.0060.00317.48
8.1.50.0030.00617.39
8.1.40.0040.00417.46
8.1.30.0040.00417.66
8.1.20.0050.00317.64
8.1.10.0040.00417.48
8.1.00.0000.00817.57
8.0.300.0040.00420.60
8.0.290.0080.00017.18
8.0.280.0000.00818.53
8.0.270.0070.00017.28
8.0.260.0030.00317.18
8.0.250.0070.00017.07
8.0.240.0030.00616.98
8.0.230.0070.00016.93
8.0.220.0000.00717.03
8.0.210.0000.00716.84
8.0.200.0000.00716.89
8.0.190.0080.00017.04
8.0.180.0040.00416.88
8.0.170.0050.00316.96
8.0.160.0000.00816.99
8.0.150.0030.00616.91
8.0.140.0030.00516.93
8.0.130.0050.00013.36
8.0.120.0000.00716.92
8.0.110.0040.00416.86
8.0.100.0040.00417.07
8.0.90.0070.00016.91
8.0.80.0030.01216.94
8.0.70.0000.00717.06
8.0.60.0000.00716.79
8.0.50.0040.00416.77
8.0.30.0160.00517.03
8.0.20.0120.00617.40
8.0.10.0050.00217.09
8.0.00.0060.01116.63
7.4.330.0050.00015.00
7.4.320.0030.00316.41
7.4.300.0000.00616.60
7.4.290.0000.00716.57
7.4.280.0000.00716.50
7.4.270.0040.00416.59
7.4.260.0000.00716.37
7.4.250.0080.00016.36
7.4.240.0020.00516.51
7.4.230.0030.00316.71
7.4.220.0070.01116.51
7.4.210.0070.01216.59
7.4.200.0000.00816.71
7.4.190.0040.00416.75
7.4.160.0030.01916.49
7.4.150.0090.01017.40
7.4.140.0200.00717.86
7.4.130.0120.00416.47
7.4.120.0080.00816.51
7.4.110.0070.01416.51
7.4.100.0090.00916.63
7.4.90.0090.00916.45
7.4.80.0060.01319.39
7.4.70.0060.00916.74
7.4.60.0070.01016.29
7.4.50.0030.00516.46
7.4.40.0090.00322.77
7.4.30.0160.00016.51
7.4.10.0130.00314.79
7.4.00.0070.00914.88
7.3.330.0030.00313.14
7.3.320.0000.00613.28
7.3.310.0040.00416.18
7.3.300.0030.00516.24
7.3.290.0040.01216.35
7.3.280.0140.00516.36
7.3.270.0150.00717.40
7.3.260.0080.01116.45
7.3.250.0080.01116.43
7.3.240.0100.00716.31
7.3.230.0130.00316.39
7.3.210.0130.00316.49
7.3.200.0070.01419.39
7.3.190.0070.01116.55
7.3.180.0100.00716.64
7.3.170.0060.01016.39
7.3.160.0130.00316.30
7.3.130.0070.01014.95
7.3.120.0050.01014.74
7.3.110.0130.00314.64
7.3.100.0070.00415.03
7.3.90.0000.01115.00
7.3.80.0030.01214.80
7.3.70.0060.00314.88
7.3.60.0070.01014.86
7.3.50.0110.00414.95
7.3.40.0070.00714.82
7.3.30.0060.01014.88
7.3.20.0030.00816.82
7.3.10.0100.00016.60
7.3.00.0080.00416.55
7.2.330.0090.00916.78
7.2.320.0160.01016.82
7.2.310.0180.00016.80
7.2.300.0100.00716.68
7.2.290.0080.00816.77
7.2.260.0040.01514.90
7.2.250.0130.00614.95
7.2.240.0130.00315.11
7.2.230.0100.00014.89
7.2.220.0070.00415.31
7.2.210.0040.01114.96
7.2.200.0070.00415.08
7.2.190.0100.00615.08
7.2.180.0040.00814.88
7.2.170.0060.00315.12
7.2.160.0070.01014.90
7.2.150.0060.01016.96
7.2.140.0030.00916.81
7.2.130.0100.00316.91
7.2.120.0090.00417.01
7.2.110.0000.01316.94
7.2.100.0060.00316.95
7.2.90.0130.00017.03
7.2.80.0030.00817.02
7.2.70.0060.01016.74
7.2.60.0090.00516.94
7.2.50.0040.01117.09
7.2.40.0070.00417.05
7.2.30.0040.00716.76
7.2.20.0130.00316.87
7.2.10.0130.00616.91
7.2.00.0020.00918.09
7.1.330.0060.00815.95
7.1.320.0040.01215.66
7.1.310.0040.00815.59
7.1.300.0100.00615.52
7.1.290.0080.00415.95
7.1.280.0000.01115.81
7.1.270.0090.00615.46
7.1.260.0080.00415.89
7.1.250.0040.00915.75
7.1.240.0040.01115.54
7.1.230.0120.00315.52
7.1.220.0000.01115.74
7.1.210.0030.01015.52
7.1.200.0050.00615.66
7.1.190.0040.01115.45
7.1.180.0040.00815.72
7.1.170.0070.00715.54
7.1.160.0030.01015.55
7.1.150.0030.01015.86
7.1.140.0080.00315.72
7.1.130.0030.00715.58
7.1.120.0090.00615.63
7.1.110.0100.00715.63
7.1.100.0040.01016.78
7.1.90.0040.00815.39
7.1.80.0090.00315.73
7.1.70.0050.00916.16
7.1.60.0050.01217.59
7.1.50.0100.01016.27
7.1.40.0080.00815.84
7.1.30.0000.01215.82
7.1.20.0070.00715.68
7.1.10.0090.00315.63
7.1.00.0070.04018.98
7.0.330.0040.00815.38
7.0.320.0130.00315.56
7.0.310.0040.00715.31
7.0.300.0000.01215.32
7.0.290.0070.00715.35
7.0.280.0070.00415.24
7.0.270.0000.00915.12
7.0.260.0130.00315.58
7.0.250.0030.01015.41
7.0.240.0070.00715.61
7.0.230.0030.00715.46
7.0.220.0000.01015.37
7.0.210.0080.00715.25
7.0.200.0050.00715.84
7.0.190.0100.00315.20
7.0.180.0100.00315.49
7.0.170.0030.00615.41
7.0.160.0110.00415.07
7.0.150.0080.00515.55
7.0.140.0060.03518.75
7.0.130.0060.00615.61
7.0.120.0040.00715.39
7.0.110.0080.00815.26
7.0.100.0030.01215.23
7.0.90.0090.00315.20
7.0.80.0070.00715.43
7.0.70.0030.01315.21
7.0.60.0070.04717.73
7.0.50.0040.02516.66
7.0.40.0050.05016.95
7.0.30.0170.04716.74
7.0.20.0100.02516.71
7.0.10.0020.05216.85
7.0.00.0040.04616.79
5.6.400.0070.00714.17
5.6.390.0120.00314.18
5.6.380.0070.00714.74
5.6.370.0070.00414.60
5.6.360.0100.00014.31
5.6.350.0040.01114.33
5.6.340.0060.00914.16
5.6.330.0070.01114.05
5.6.320.0000.01114.60
5.6.310.0000.01314.18
5.6.300.0000.00914.59
5.6.290.0070.00714.13
5.6.280.0020.04317.69
5.6.270.0070.00714.26
5.6.260.0040.01214.62
5.6.250.0160.00014.60
5.6.240.0060.00614.46
5.6.230.0030.00614.30
5.6.220.0070.00714.19
5.6.210.0030.04217.40
5.6.200.0050.03216.18
5.6.190.0070.04417.32
5.6.180.0220.03717.53
5.6.170.0210.03517.42
5.6.160.0030.05017.36
5.6.150.0050.04016.25
5.6.140.0070.02816.15
5.6.130.0030.02316.24
5.6.120.0110.03917.75
5.6.110.0070.03717.52
5.6.100.0060.03517.65
5.6.90.0050.04917.79
5.6.80.0190.03717.31
5.6.70.0070.00314.23
5.6.60.0060.01014.15
5.6.50.0030.01414.29
5.6.40.0030.01014.50
5.6.30.0060.00614.11
5.6.20.0030.00914.16
5.6.10.0030.00614.21
5.6.00.0140.00014.25
5.5.380.0030.01014.39
5.5.370.0060.00314.16
5.5.360.0100.00614.57
5.5.350.0120.04517.35
5.5.340.0070.04416.02
5.5.330.0080.02317.35
5.5.320.0100.04417.24
5.5.310.0220.02217.34
5.5.300.0050.04716.17
5.5.290.0060.02116.03
5.5.280.0050.04417.54
5.5.270.0020.04417.63
5.5.260.0050.02417.63
5.5.250.0070.04417.43
5.5.240.1880.02817.17
5.5.230.0040.00714.02
5.5.220.0060.00614.24
5.5.210.0110.00414.00
5.5.200.0080.00414.07
5.5.190.0040.01114.13
5.5.180.0080.00414.30
5.5.170.0060.00614.26
5.5.160.0030.00714.23
5.5.150.0030.01014.26
5.5.140.0000.01214.17
5.5.130.0060.00614.40
5.5.120.0030.00713.99
5.5.110.0070.01014.14
5.5.100.0000.01213.75
5.5.90.0060.00614.36
5.5.80.0110.00614.17
5.5.70.0000.01114.35
5.5.60.0000.01314.28
5.5.50.0040.01414.45
5.5.40.0100.00014.23
5.5.30.0030.01014.00
5.5.20.0060.00914.21
5.5.10.0030.01013.95
5.5.00.0040.00413.88
5.4.450.0060.03116.26
5.4.440.0130.04816.53
5.4.430.0120.02916.47
5.4.420.0160.02916.46
5.4.410.0230.02516.38
5.4.400.0160.02516.25
5.4.390.0200.03516.18
5.4.380.0280.03515.98
5.4.370.0330.03515.91
5.4.360.0200.03015.99
5.4.350.0250.02816.07
5.4.340.0100.04715.93
5.4.330.0030.00713.35
5.4.320.0070.02812.93
5.4.310.0060.02212.93
5.4.300.0050.02312.93
5.4.290.0040.02512.93
5.4.280.0130.04212.86
5.4.270.0090.02912.86
5.4.260.0080.03212.86
5.4.250.0040.03312.86
5.4.240.0050.03012.86
5.4.230.0100.03312.86
5.4.220.0110.02812.86
5.4.210.0050.02512.86
5.4.200.0070.04012.86
5.4.190.0100.04812.85
5.4.180.0090.02512.86
5.4.170.0140.04412.86
5.4.160.0070.02912.86
5.4.150.0030.03112.85
5.4.140.0060.02212.70
5.4.130.0090.02512.69
5.4.120.0050.02712.67
5.4.110.0080.02412.67
5.4.100.0070.02912.67
5.4.90.0040.02612.67
5.4.80.0070.02712.67
5.4.70.0080.02312.67
5.4.60.0070.02912.67
5.4.50.0080.03112.67
5.4.40.0080.02012.66
5.4.30.0060.02012.66
5.4.20.0070.02212.66
5.4.10.0080.04412.66
5.4.00.0090.05112.40
5.3.290.0050.02113.07
5.3.280.0080.02513.03
5.3.270.0140.03613.04
5.3.260.0120.02713.04
5.3.250.0070.03913.04
5.3.240.0110.04713.04
5.3.230.0100.02913.03
5.3.220.0090.03913.02
5.3.210.0130.05213.01
5.3.200.0060.02513.02
5.3.190.0070.01913.01
5.3.180.0040.02213.01
5.3.170.0050.02113.01
5.3.160.0090.01813.01
5.3.150.0100.02013.01
5.3.140.0100.02213.01
5.3.130.0050.02313.00
5.3.120.0070.02313.00
5.3.110.0070.02513.00
5.3.100.0040.02412.73
5.3.90.0100.01712.72
5.3.80.0050.02212.71
5.3.70.0050.02212.71
5.3.60.0080.02912.71
5.3.50.0040.02512.68
5.3.40.0070.02212.68
5.3.30.0060.02012.65
5.3.20.0060.02012.55
5.3.10.0080.01912.53
5.3.00.0090.02112.52
5.2.170.0020.0369.20
5.2.160.0060.0309.20
5.2.150.0060.0349.20
5.2.140.0060.0349.20
5.2.130.0090.0339.15
5.2.120.0060.0299.15
5.2.110.0040.0419.16
5.2.100.0110.0369.16
5.2.90.0120.0669.16
5.2.80.0130.0609.16
5.2.70.0060.0319.16
5.2.60.0060.0309.11
5.2.50.0070.0299.07
5.2.40.0060.0349.05
5.2.30.0150.0499.03
5.2.20.0070.0299.01
5.2.10.0080.0308.93
5.2.00.0090.0498.79
5.1.60.0090.0388.07
5.1.50.0110.0408.08
5.1.40.0090.0468.06
5.1.30.0100.0478.40
5.1.20.0120.0608.43
5.1.10.0140.0488.15
5.1.00.0140.0648.16
5.0.50.0090.0306.63
5.0.40.0080.0266.49
5.0.30.0020.0456.30
5.0.20.0120.0416.27
5.0.10.0070.0346.25
5.0.00.0090.0456.23
4.4.90.0020.0314.78
4.4.80.0060.0254.75
4.4.70.0070.0294.75
4.4.60.0050.0284.76
4.4.50.0080.0344.77
4.4.40.0050.0504.71
4.4.30.0070.0264.76
4.4.20.0080.0344.84
4.4.10.0090.0334.85
4.4.00.0050.0344.75
4.3.110.0090.0534.67
4.3.100.0060.0204.66
4.3.90.0070.0364.63
4.3.80.0090.0484.59
4.3.70.0130.0444.63
4.3.60.0110.0334.63
4.3.50.0070.0214.63
4.3.40.0050.0244.54
4.3.30.0030.0173.29
4.3.20.0020.0183.28
4.3.10.0040.0203.24
4.3.00.0000.01310.30

preferences:
57.24 ms | 401 KiB | 5 Q