3v4l.org

run code in 300+ PHP versions simultaneously
<?Php require "config.php"; // Database connection $count="SELECT id,name, social, math, science, sum(social + math + science ) as total, sum(social + math + science )/3 as avg from student3 group by id"; echo "<table>"; echo "<tr><th>id</th><th>name</th><th>social</th><th>math</th><th>science</th><th>total</th><th>avg</th></tr>"; foreach ($dbo->query($count) as $row) { echo "<tr ><td>$row[id]</td><td>$row[name]</td><td>$row[social]</td><td>$row[math]</td><td>$row[science]</td><td>$row[total]</td><td>$row[avg]</td></tr>"; } echo "</table>"; ?>

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.0150.00418.79
8.3.30.0100.00319.17
8.3.20.0030.00520.19
8.3.10.0080.00020.52
8.3.00.0050.00319.50
8.2.170.0120.00622.96
8.2.160.0110.00420.39
8.2.150.0070.00024.18
8.2.140.0040.00424.66
8.2.130.0020.00526.16
8.2.120.0060.00320.99
8.2.110.0090.00020.55
8.2.100.0060.00617.91
8.2.90.0040.00419.27
8.2.80.0040.00417.97
8.2.70.0030.00617.50
8.2.60.0030.00517.93
8.2.50.0060.00318.07
8.2.40.0040.00418.22
8.2.30.0040.00419.44
8.2.20.0040.00417.68
8.2.10.0040.00418.01
8.2.00.0000.00717.67
8.1.270.0120.00423.86
8.1.260.0070.00026.35
8.1.250.0000.00828.09
8.1.240.0050.00522.14
8.1.230.0040.00721.88
8.1.220.0040.00417.74
8.1.210.0080.00018.77
8.1.200.0090.00317.22
8.1.190.0080.00017.23
8.1.180.0030.00618.10
8.1.170.0050.00318.64
8.1.160.0040.00422.03
8.1.150.0040.00418.72
8.1.140.0070.00017.50
8.1.130.0030.00317.78
8.1.120.0000.00817.32
8.1.110.0070.00017.28
8.1.100.0000.00817.34
8.1.90.0000.00717.45
8.1.80.0040.00417.38
8.1.70.0000.00717.30
8.1.60.0000.00917.58
8.1.50.0080.00017.61
8.1.40.0040.00417.41
8.1.30.0050.00517.66
8.1.20.0050.00317.51
8.1.10.0000.00717.65
8.1.00.0040.00417.59
8.0.300.0060.00318.77
8.0.290.0000.00716.88
8.0.280.0000.00718.40
8.0.270.0030.00317.43
8.0.260.0030.00317.25
8.0.250.0030.00317.00
8.0.240.0040.00417.11
8.0.230.0030.00316.98
8.0.220.0070.00017.00
8.0.210.0000.00817.03
8.0.200.0040.00417.11
8.0.190.0000.00717.10
8.0.180.0080.00016.89
8.0.170.0000.00917.07
8.0.160.0000.00816.97
8.0.150.0070.00016.84
8.0.140.0000.00716.88
8.0.130.0050.00013.50
8.0.120.0080.00316.90
8.0.110.0070.00016.87
8.0.100.0000.00717.01
8.0.90.0000.00816.90
8.0.80.0040.01117.01
8.0.70.0070.00016.91
8.0.60.0040.00417.10
8.0.50.0040.00417.08
8.0.30.0100.01017.06
8.0.20.0140.00617.40
8.0.10.0000.00717.07
8.0.00.0090.01016.86
7.4.330.0000.00515.00
7.4.320.0030.00316.54
7.4.300.0000.00816.52
7.4.290.0040.00416.63
7.4.280.0030.00516.43
7.4.270.0030.00316.53
7.4.260.0050.00316.52
7.4.250.0050.00216.57
7.4.240.0020.00516.54
7.4.230.0030.00316.59
7.4.220.0040.00416.42
7.4.210.0120.00316.61
7.4.200.0000.00716.38
7.4.160.0170.00016.40
7.4.150.0030.01717.40
7.4.140.0130.00817.86
7.4.130.0100.00816.47
7.4.120.0070.01016.53
7.4.110.0060.01016.28
7.4.100.0130.00616.42
7.4.90.0170.00316.44
7.4.80.0100.00719.39
7.4.70.0120.00616.61
7.4.60.0070.01016.53
7.4.50.0040.00416.77
7.4.40.0120.00616.22
7.4.30.0040.01316.27
7.4.00.0080.00714.75
7.3.330.0070.00013.03
7.3.320.0000.00613.26
7.3.310.0000.00716.38
7.3.300.0000.00716.27
7.3.290.0030.01316.37
7.3.280.0090.01016.30
7.3.270.0060.01217.40
7.3.260.0140.00316.28
7.3.250.0100.01116.46
7.3.240.0000.01716.26
7.3.230.0180.00316.51
7.3.210.0000.01516.24
7.3.200.0130.00319.39
7.3.190.0110.01116.28
7.3.180.0040.01116.43
7.3.170.0090.01316.36
7.3.160.0120.00616.47
7.3.120.0080.01114.73
7.3.110.0120.00614.60
7.3.100.0070.01114.76
7.3.90.0060.00915.05
7.3.80.0100.00414.78
7.3.70.0050.01214.88
7.3.60.0050.00914.76
7.3.50.0080.00814.79
7.3.40.0090.00314.70
7.3.30.0110.00314.81
7.3.20.0050.00816.49
7.3.10.0050.00816.67
7.3.00.0050.00716.34
7.2.330.0090.00916.56
7.2.320.0030.01616.54
7.2.310.0060.01616.62
7.2.300.0100.00716.32
7.2.290.0070.01316.61
7.2.250.0090.01014.95
7.2.240.0050.01115.06
7.2.230.0060.01014.86
7.2.220.0060.00314.70
7.2.210.0050.00914.74
7.2.200.0020.01414.77
7.2.190.0090.00415.01
7.2.180.0070.00714.70
7.2.170.0020.01314.99
7.2.60.0100.00316.52
7.2.00.0090.00019.45
7.1.330.0080.00715.66
7.1.320.0070.00515.69
7.1.310.0080.00415.52
7.1.300.0040.00715.57
7.1.290.0070.00715.70
7.1.280.0030.01115.69
7.1.270.0030.01115.57
7.1.260.0080.00515.77
7.1.200.0000.01515.75
7.1.100.0080.00318.07
7.1.70.0030.00617.00
7.1.60.0070.01419.61
7.1.50.0140.00616.82
7.1.00.0070.07322.46
7.0.200.0030.00316.60
7.0.140.0070.07022.15
7.0.60.0030.04019.95
7.0.50.0000.04717.91
7.0.40.0130.04719.97
7.0.30.0330.08020.35
7.0.20.0370.06020.32
7.0.10.0000.09320.31
7.0.00.0030.07320.31
5.6.280.0070.06720.82
5.6.210.0100.05320.56
5.6.200.0230.06718.13
5.6.190.0130.04720.74
5.6.180.0470.04320.36
5.6.170.0330.08020.52
5.6.160.0000.04720.42
5.6.150.0030.08718.16
5.6.140.0100.06018.23
5.6.130.0130.07718.15
5.6.120.0100.07020.93
5.6.110.0070.04720.98
5.6.100.0030.08720.96
5.6.90.0000.04321.09
5.6.80.0100.08020.42
5.5.350.0070.08720.41
5.5.340.0130.07018.03
5.5.330.0000.05720.41
5.5.320.0300.04720.13
5.5.310.0230.04320.27
5.5.300.0100.08017.98
5.5.290.0070.07718.01
5.5.280.0100.07720.88
5.5.270.0170.04720.78
5.5.260.0030.09320.95
5.5.250.0230.05720.61
5.5.240.0170.07720.17
5.4.450.0370.04019.40
5.4.440.0300.04719.41
5.4.430.0100.03319.23
5.4.420.0200.04019.39
5.4.410.0270.04719.27
5.4.400.0370.04018.82
5.4.390.0100.03718.94
5.4.380.0400.05318.64
5.4.370.0400.06718.50
5.4.360.0330.07018.52
5.4.350.0570.06018.66
5.4.340.0400.05018.66
5.4.320.0040.04112.47
5.4.310.0060.04912.47
5.4.300.0150.03312.48
5.4.290.0070.03812.47
5.4.280.0050.03912.37
5.4.270.0060.03612.36
5.4.260.0070.03712.36
5.4.250.0070.03712.37
5.4.240.0090.03312.37
5.4.230.0090.03512.36
5.4.220.0070.03412.36
5.4.210.0090.03312.36
5.4.200.0110.04012.36
5.4.190.0090.03612.36
5.4.180.0110.03612.35
5.4.170.0060.03612.37
5.4.160.0050.03712.36
5.4.150.0030.03912.36
5.4.140.0070.04012.04
5.4.130.0060.04412.04
5.4.120.0070.04011.98
5.4.110.0040.04311.98
5.4.100.0040.03711.98
5.4.90.0050.04511.99
5.4.80.0080.03911.98
5.4.70.0070.04111.98
5.4.60.0070.03711.98
5.4.50.0090.03911.98
5.4.40.0080.03711.97
5.4.30.0040.03811.96
5.4.20.0060.04111.96
5.4.10.0120.04011.97
5.4.00.0070.03511.46
5.3.290.0040.04212.80
5.3.280.0080.04112.70
5.3.270.0060.03912.72
5.3.260.0090.03712.72
5.3.250.0070.03612.72
5.3.240.0060.03812.72
5.3.230.0050.04012.71
5.3.220.0060.03712.68
5.3.210.0090.04012.68
5.3.200.0070.04312.68
5.3.190.0060.04212.68
5.3.180.0070.03512.68
5.3.170.0070.03912.66
5.3.160.0090.03812.67
5.3.150.0040.04012.68
5.3.140.0100.03612.66
5.3.130.0070.04112.66
5.3.120.0090.04012.66
5.3.110.0080.04012.66
5.3.100.0060.03812.12
5.3.90.0040.03912.09
5.3.80.0070.03812.08
5.3.70.0050.03812.08
5.3.60.0070.03712.07
5.3.50.0080.03712.00
5.3.40.0070.04412.00
5.3.30.0080.03911.95
5.3.20.0070.04311.73
5.3.10.0080.03411.70
5.3.00.0050.04311.69
5.2.170.0040.0339.20
5.2.160.0050.0309.19
5.2.150.0060.0359.19
5.2.140.0030.0339.19
5.2.130.0100.0319.14
5.2.120.0100.0319.15
5.2.110.0070.0299.15
5.2.100.0090.0259.15
5.2.90.0130.0289.14
5.2.80.0080.0299.14
5.2.70.0070.0289.15
5.2.60.0060.0409.10
5.2.50.0080.0379.07
5.2.40.0040.0329.04
5.2.30.0030.0339.02
5.2.20.0060.0329.03
5.2.10.0050.0368.95
5.2.00.0050.0328.82
5.1.60.0020.0278.09
5.1.50.0070.0348.09
5.1.40.0060.0228.07
5.1.30.0030.0268.43
5.1.20.0020.0318.44
5.1.10.0060.0318.17
5.1.00.0060.0288.17
5.0.50.0060.0226.64
5.0.40.0040.0256.51
5.0.30.0040.0326.31
5.0.20.0050.0246.29
5.0.10.0020.0256.27
5.0.00.0050.0336.26
4.4.90.0020.0234.77
4.4.80.0050.0254.75
4.4.70.0050.0134.76
4.4.60.0060.0204.75
4.4.50.0020.0214.77
4.4.40.0040.0274.70
4.4.30.0050.0184.76
4.4.20.0040.0194.84
4.4.10.0030.0164.85
4.4.00.0040.0334.76
4.3.110.0040.0284.67
4.3.100.0050.0194.66
4.3.90.0020.0264.64
4.3.80.0030.0304.59
4.3.70.0050.0144.63
4.3.60.0040.0194.63
4.3.50.0040.0184.63
4.3.40.0050.0254.54
4.3.30.0040.0203.30
4.3.20.0020.0263.28
4.3.10.0020.0153.23
4.3.00.0000.01318.16

preferences:
45.04 ms | 400 KiB | 5 Q