3v4l.org

run code in 300+ PHP versions simultaneously
<?php class FifaRankingHeap extends \SplHeap { protected function compare($value1, $value2) { return $value1['points'] - $value2['points']; }} $heap = new FifaRankingHeap(); $heap->insert(array('country' => 'Colombia', 'points' => 1137)); $heap->insert(array('country' => 'Uruguay', 'points' => 1147)); $heap->insert(array('country' => 'Argentina', 'points' => 1175)); $heap->insert(array('country' => 'Brazil', 'points' => 1242)); $heap->insert(array('country' => 'Portugal', 'points' => 1189)); $heap->insert(array('country' => 'Germany', 'points' => 1300)); $heap->insert(array('country' => 'Switzerland', 'points' => 1149)); $i = 2; foreach ($heap as $country) { echo $i++.$country['country'].' has '.$country['points'].' points.'.PHP_EOL; }

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.0160.00018.94
8.3.30.0070.00719.04
8.3.20.0090.00020.34
8.3.10.0080.00023.66
8.3.00.0080.00019.16
8.2.170.0110.00422.96
8.2.160.0070.00720.24
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0080.00020.90
8.2.110.0030.01322.20
8.2.100.0060.00617.84
8.2.90.0040.00419.17
8.2.80.0050.00317.97
8.2.70.0000.00917.63
8.2.60.0040.00418.05
8.2.50.0000.00818.07
8.2.40.0000.01019.82
8.2.30.0040.00418.41
8.2.20.0000.00817.77
8.2.10.0000.00718.03
8.2.00.0040.00417.84
8.1.270.0040.00423.84
8.1.260.0050.00326.35
8.1.250.0050.00328.09
8.1.240.0060.00322.16
8.1.230.0070.00419.02
8.1.220.0050.00317.77
8.1.210.0060.00318.77
8.1.200.0090.00017.38
8.1.190.0040.00417.35
8.1.180.0060.00319.01
8.1.170.0030.00618.63
8.1.160.0050.00322.04
8.1.150.0040.00418.69
8.1.140.0030.00517.40
8.1.130.0070.00017.86
8.1.120.0040.00317.55
8.1.110.0030.00517.42
8.1.100.0040.00417.53
8.1.90.0040.00417.50
8.1.80.0040.00317.52
8.1.70.0040.00417.45
8.1.60.0040.00417.61
8.1.50.0000.00817.55
8.1.40.0000.00817.58
8.1.30.0050.00317.68
8.1.20.0000.00717.61
8.1.10.0040.00417.57
8.1.00.0040.00417.43
8.0.300.0040.00418.77
8.0.290.0040.00417.18
8.0.280.0030.00318.48
8.0.270.0070.00017.23
8.0.260.0000.00617.29
8.0.250.0030.00616.89
8.0.240.0050.00517.03
8.0.230.0000.00716.87
8.0.220.0050.00216.89
8.0.210.0000.00716.89
8.0.200.0030.00517.02
8.0.190.0030.00316.96
8.0.180.0040.00416.99
8.0.170.0080.00016.94
8.0.160.0030.00516.87
8.0.150.0050.00316.75
8.0.140.0000.00816.89
8.0.130.0040.00413.38
8.0.120.0050.00316.77
8.0.110.0040.00416.98
8.0.100.0080.00016.78
8.0.90.0040.00316.88
8.0.80.0160.00316.90
8.0.70.0000.00716.80
8.0.60.0040.00416.92
8.0.50.0080.00017.03
8.0.30.0110.00917.07
8.0.20.0150.00917.40
8.0.10.0050.00317.07
8.0.00.0140.00516.87
7.4.330.0030.00315.00
7.4.320.0040.00416.61
7.4.300.0030.00316.44
7.4.290.0040.00416.39
7.4.280.0050.00316.54
7.4.270.0020.00516.63
7.4.260.0030.00316.41
7.4.250.0050.00316.48
7.4.240.0030.00416.55
7.4.230.0000.00816.66
7.4.220.0090.01616.60
7.4.210.0070.00916.54
7.4.200.0000.00716.69
7.4.190.0000.00716.40
7.4.160.0080.00816.51
7.4.150.0090.00917.40
7.4.140.0080.01417.86
7.4.130.0120.00816.52
7.4.120.0100.00816.50
7.4.110.0090.00916.72
7.4.100.0060.01216.34
7.4.90.0100.00716.46
7.4.80.0060.01319.39
7.4.70.0080.00816.46
7.4.60.0070.01016.49
7.4.50.0040.00416.64
7.4.40.0060.01016.54
7.4.30.0100.00716.38
7.4.00.0100.00315.18
7.3.330.0030.00313.36
7.3.320.0020.00213.17
7.3.310.0070.00016.41
7.3.300.0030.00316.28
7.3.290.0030.01016.33
7.3.280.0090.01116.28
7.3.270.0130.00417.40
7.3.260.0120.01216.65
7.3.250.0130.00916.42
7.3.240.0030.01816.50
7.3.230.0120.00616.59
7.3.210.0130.00316.53
7.3.200.0090.00919.39
7.3.190.0160.00316.43
7.3.180.0040.01216.62
7.3.170.0070.01416.34
7.3.160.0120.00416.29
7.3.120.0070.01014.79
7.3.10.0110.01116.18
7.3.00.0100.01016.38
7.2.330.0090.00916.80
7.2.320.0060.01216.46
7.2.310.0160.00716.82
7.2.300.0120.00916.79
7.2.290.0110.00716.80
7.2.130.0150.01516.82
7.2.120.0130.01316.74
7.2.110.0220.00616.89
7.2.100.0240.00816.79
7.2.90.0120.01216.92
7.2.80.0060.00916.35
7.2.70.0080.00816.46
7.2.60.0110.01116.48
7.2.50.0080.00816.73
7.2.40.0060.00916.40
7.2.30.0120.01616.96
7.2.20.0130.00716.87
7.2.10.0150.00416.69
7.2.00.0090.00818.00
7.1.250.0110.00715.59
7.1.100.0040.01117.96
7.1.70.0030.00616.92
7.1.60.0090.01619.46
7.1.50.0130.01016.95
7.1.00.0100.07022.51
7.0.200.0030.00716.53
7.0.140.0000.07722.06
7.0.60.0200.07720.04
7.0.50.0030.04317.92
7.0.40.0170.05719.96
7.0.30.0170.05020.05
7.0.20.0270.04020.16
7.0.10.0030.04320.33
7.0.00.0100.08020.15
5.6.280.0000.07720.78
5.6.210.0070.08320.52
5.6.200.0030.05018.24
5.6.190.0100.08320.48
5.6.180.0100.03720.39
5.6.170.0200.04320.44
5.6.160.0030.08720.46
5.6.150.0030.07318.29
5.6.140.0100.07718.14
5.6.130.0100.04718.11
5.6.120.0130.07720.99
5.6.110.0030.06721.00
5.6.100.0070.07021.07
5.6.90.0070.08721.12
5.6.80.0200.06020.40
5.5.350.0000.09020.53
5.5.340.0070.08317.98
5.5.330.0100.04320.31
5.5.320.0300.07020.34
5.5.310.0230.08020.30
5.5.300.0100.07718.09
5.5.290.0030.04317.91
5.5.280.0030.04020.99
5.5.270.0100.08320.80
5.5.260.0030.08020.66
5.5.250.0130.07020.63
5.5.240.0070.07020.27
5.4.450.1130.03719.50
5.4.440.1270.05719.47
5.4.430.0700.04019.30
5.4.420.0430.05019.30
5.4.410.0900.03319.29
5.4.400.0630.04018.97
5.4.390.1200.03318.98
5.4.380.0330.06018.80
5.4.370.0300.05718.82
5.4.360.0470.06318.80
5.4.350.0470.05718.57
5.4.340.0430.05318.48
5.4.320.0050.03712.50
5.4.310.0060.03712.50
5.4.300.0070.03812.50
5.4.290.0050.04012.50
5.4.280.0060.03712.40
5.4.270.0060.03712.39
5.4.260.0070.03812.40
5.4.250.0110.03312.39
5.4.240.0140.04112.39
5.4.230.0070.05712.39
5.4.220.0070.04612.39
5.4.210.0060.04312.39
5.4.200.0110.03712.39
5.4.190.0060.03712.39
5.4.180.0090.03912.39
5.4.170.0080.04012.40
5.4.160.0050.04112.39
5.4.150.0100.04412.39
5.4.140.0070.05312.07
5.4.130.0110.04712.06
5.4.120.0090.04112.02
5.4.110.0080.03812.02
5.4.100.0140.04612.01
5.4.90.0110.03512.02
5.4.80.0190.05912.01
5.4.70.0110.04712.01
5.4.60.0090.04112.01
5.4.50.0070.03512.01
5.4.40.0030.03912.00
5.4.30.0050.03712.00
5.4.20.0060.03712.00
5.4.10.0100.03312.00
5.4.00.0120.03211.48
5.3.290.0070.03812.80
5.3.280.0100.03512.71
5.3.270.0110.03512.72
5.3.260.0060.04212.72
5.3.250.0100.03712.72
5.3.240.0090.04112.72
5.3.230.0120.04112.71
5.3.220.0050.04312.68
5.3.210.0110.04112.68
5.3.200.0100.06112.68
5.3.190.0070.05712.68
5.3.180.0110.04212.67
5.3.170.0150.06812.66
5.3.160.0100.07012.68
5.3.150.0090.06912.68
5.3.140.0070.06112.66
5.3.130.0120.07612.66
5.3.120.0120.05412.66
5.3.110.0100.05712.66
5.3.100.0120.06512.13
5.3.90.0130.04712.12
5.3.80.0100.04412.11
5.3.70.0070.04712.11
5.3.60.0090.03812.09
5.3.50.0100.03412.04
5.3.40.0080.03512.04
5.3.30.0090.03712.00
5.3.20.0100.04511.78
5.3.10.0100.05111.74
5.3.00.0080.03711.73
5.2.170.0080.0379.22
5.2.160.0230.0559.22
5.2.150.0120.0379.22
5.2.140.0060.0379.22
5.2.130.0050.0319.18
5.2.120.0040.0309.18
5.2.110.0060.0299.19
5.2.100.0060.0289.19
5.2.90.0080.0379.18
5.2.80.0070.0449.18
5.2.70.0040.0519.18
5.2.60.0340.1169.13
5.2.50.0070.0429.09
5.2.40.0060.0369.07
5.2.30.0100.0559.05
5.2.20.0080.0469.04
5.2.10.0090.0468.95
5.2.00.0080.0528.81
5.1.60.0090.0378.09
5.1.50.0040.0278.09
5.1.40.0050.0278.07
5.1.30.0020.0318.42
5.1.20.0060.0328.45
5.1.10.0070.0258.16
5.1.00.0050.0278.17
5.0.50.0030.0246.66
5.0.40.0090.0366.52
5.0.30.0050.0446.33
5.0.20.0050.0276.29
5.0.10.0030.0246.28
5.0.00.0060.0336.27
4.4.90.0030.0214.78
4.4.80.0050.0254.75
4.4.70.0040.0164.76
4.4.60.0060.0164.76
4.4.50.0090.0304.77
4.4.40.0170.0744.71
4.4.30.0020.0214.76
4.4.20.0030.0224.84
4.4.10.0040.0214.85
4.4.00.0190.0954.76
4.3.110.0040.0234.67
4.3.100.0040.0384.66
4.3.90.0040.0214.63
4.3.80.0030.0334.58
4.3.70.0050.0244.63
4.3.60.0050.0234.63
4.3.50.0080.0334.62
4.3.40.0110.0434.54
4.3.30.0040.0203.30
4.3.20.0030.0233.28
4.3.10.0040.0363.23
4.3.00.0230.01716.15

preferences:
38.27 ms | 400 KiB | 5 Q