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.<br>'; }

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.0120.00616.62
8.3.50.0110.00822.00
8.3.40.0070.01418.94
8.3.30.0150.00018.97
8.3.20.0050.00320.34
8.3.10.0040.00423.66
8.3.00.0040.00419.17
8.2.180.0120.00618.29
8.2.170.0070.00722.96
8.2.160.0100.00320.38
8.2.150.0070.00024.18
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0070.00020.52
8.2.110.0100.00022.25
8.2.100.0040.00817.91
8.2.90.0080.00017.63
8.2.80.0000.00819.18
8.2.70.0050.00317.93
8.2.60.0040.00417.93
8.2.50.0090.00018.10
8.2.40.0030.00520.62
8.2.30.0040.00418.27
8.2.20.0070.00017.77
8.2.10.0000.00718.11
8.2.00.0040.00417.70
8.1.280.0040.01125.92
8.1.270.0000.00823.92
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0080.00023.95
8.1.230.0030.00719.12
8.1.220.0000.00817.78
8.1.210.0000.00818.77
8.1.200.0070.00317.35
8.1.190.0080.00017.25
8.1.180.0000.00718.10
8.1.170.0030.00518.71
8.1.160.0020.00522.09
8.1.150.0000.00718.71
8.1.140.0040.00417.45
8.1.130.0030.00617.82
8.1.120.0000.00717.36
8.1.110.0040.00717.39
8.1.100.0000.00817.45
8.1.90.0040.00417.49
8.1.80.0050.00217.50
8.1.70.0070.00017.47
8.1.60.0040.00717.52
8.1.50.0080.00017.54
8.1.40.0040.00417.55
8.1.30.0040.00417.59
8.1.20.0030.00617.53
8.1.10.0040.00417.61
8.1.00.0060.00317.56
8.0.300.0030.00521.66
8.0.290.0030.00616.63
8.0.280.0030.00318.51
8.0.270.0000.00817.16
8.0.260.0040.00417.26
8.0.250.0000.00716.99
8.0.240.0060.00316.97
8.0.230.0070.00016.90
8.0.220.0040.00416.84
8.0.210.0000.00816.96
8.0.200.0000.00716.86
8.0.190.0050.00316.96
8.0.180.0040.00416.85
8.0.170.0000.00816.94
8.0.160.0070.00016.88
8.0.150.0040.00416.84
8.0.140.0000.00716.95
8.0.130.0060.00013.44
8.0.120.0060.00316.79
8.0.110.0070.00016.92
8.0.100.0000.00816.99
8.0.90.0030.00616.78
8.0.80.0070.01416.90
8.0.70.0000.01016.73
8.0.60.0000.00716.82
8.0.50.0040.00416.86
8.0.30.0120.00717.01
8.0.20.0070.01417.40
8.0.10.0020.00516.93
8.0.00.0100.00816.80
7.4.330.0060.00015.05
7.4.320.0030.00316.44
7.4.300.0030.00316.53
7.4.290.0040.00416.65
7.4.280.0040.00416.48
7.4.270.0000.00716.53
7.4.260.0060.00316.51
7.4.250.0070.00016.60
7.4.240.0010.00616.52
7.4.230.0070.00016.42
7.4.220.0060.01216.66
7.4.210.0080.00716.57
7.4.200.0030.00316.63
7.4.190.0040.00416.60
7.4.160.0160.00616.53
7.4.150.0110.00717.40
7.4.140.0070.01017.86
7.4.130.0120.00416.65
7.4.120.0080.00816.62
7.4.110.0070.01116.70
7.4.100.0080.00916.58
7.4.90.0070.01016.34
7.4.80.0060.01219.39
7.4.70.0110.00516.45
7.4.60.0090.00916.49
7.4.50.0000.00816.27
7.4.40.0120.00616.56
7.4.30.0130.00316.68
7.4.00.0040.01114.86
7.3.330.0050.00013.40
7.3.320.0030.00313.35
7.3.310.0070.00016.27
7.3.300.0000.00716.40
7.3.290.0080.00616.40
7.3.280.0120.00416.28
7.3.270.0090.00617.40
7.3.260.0080.00816.35
7.3.250.0130.00716.52
7.3.240.0150.00616.43
7.3.230.0090.00916.50
7.3.210.0080.00816.40
7.3.200.0090.00919.39
7.3.190.0050.01616.45
7.3.180.0130.00316.45
7.3.170.0150.00616.61
7.3.160.0090.00616.61
7.3.120.0070.00714.52
7.3.10.0040.01116.60
7.3.00.0080.00416.75
7.2.330.0090.00916.80
7.2.320.0150.00916.79
7.2.310.0070.01016.80
7.2.300.0060.01816.80
7.2.290.0040.01216.43
7.2.130.0060.01016.70
7.2.120.0120.00017.02
7.2.110.0080.00816.84
7.2.100.0070.00416.91
7.2.90.0060.00616.96
7.2.80.0040.00816.84
7.2.70.0090.00017.17
7.2.60.0020.01017.00
7.2.50.0030.00917.21
7.2.40.0030.00916.89
7.2.30.0030.00716.77
7.2.20.0140.00017.05
7.2.10.0070.00717.08
7.2.00.0060.00816.75
7.1.250.0060.00315.79
7.1.200.0060.00315.72
7.1.70.0060.00316.92
7.1.60.0070.01419.46
7.1.50.0130.01616.98
7.1.00.0130.06722.33
7.0.200.0000.00716.68
7.0.140.0100.06721.92
7.0.60.0100.06319.82
7.0.50.0100.06317.87
7.0.40.0030.06020.24
7.0.30.0270.04320.17
7.0.20.0330.07720.26
7.0.10.0030.07020.34
7.0.00.0100.06720.12
5.6.280.0030.07320.90
5.6.210.0170.07020.77
5.6.200.0070.08718.16
5.6.190.0130.04320.60
5.6.180.0030.08720.46
5.6.170.0430.06020.44
5.6.160.0030.06320.54
5.6.150.0030.06318.16
5.6.140.0070.04018.18
5.6.130.0030.04018.19
5.6.120.0130.07720.95
5.6.110.0030.04321.14
5.6.100.0030.08720.96
5.6.90.0070.04021.00
5.6.80.0030.08320.38
5.5.350.4170.04320.39
5.5.340.0100.06317.95
5.5.330.0000.04720.27
5.5.320.0270.07720.38
5.5.310.0330.06020.26
5.5.300.0130.06717.94
5.5.290.0130.05717.98
5.5.280.0000.04320.75
5.5.270.0070.04320.66
5.5.260.0000.04320.95
5.5.250.0070.08020.77
5.5.240.0030.04720.20
5.4.450.0130.05719.46
5.4.440.0070.06319.45
5.4.430.0100.05719.21
5.4.420.1100.07719.28
5.4.410.0670.05719.42
5.4.400.1370.04319.11
5.4.390.1000.06319.34
5.4.380.0170.05318.51
5.4.370.0170.05018.80
5.4.360.0170.05018.57
5.4.350.0170.05018.86
5.4.340.0030.06718.80
5.4.320.0110.05512.50
5.4.310.0090.04912.50
5.4.300.0100.04512.51
5.4.290.0080.03812.50
5.4.280.0070.03912.40
5.4.270.0090.04812.40
5.4.260.0080.05112.40
5.4.250.0070.04312.40
5.4.240.0050.04012.39
5.4.230.0070.03912.39
5.4.220.0080.04512.39
5.4.210.0140.04012.39
5.4.200.0050.05112.39
5.4.190.0070.03712.39
5.4.180.0080.03712.39
5.4.170.0050.04012.40
5.4.160.0050.03912.39
5.4.150.0080.03812.39
5.4.140.0050.03812.07
5.4.130.0080.03412.07
5.4.120.0060.03812.02
5.4.110.0070.03512.02
5.4.100.0070.03512.02
5.4.90.0050.03812.02
5.4.80.0070.03612.02
5.4.70.0070.03412.01
5.4.60.0080.03712.01
5.4.50.0060.03612.02
5.4.40.0090.03512.00
5.4.30.0080.03612.00
5.4.20.0080.04012.00
5.4.10.0060.03512.00
5.4.00.0080.03611.48
5.3.290.0050.04512.80
5.3.280.0060.03912.71
5.3.270.0070.04212.72
5.3.260.0060.04712.72
5.3.250.0090.03812.72
5.3.240.0060.03912.72
5.3.230.0070.03812.71
5.3.220.0060.04012.68
5.3.210.0070.04012.68
5.3.200.0090.04512.68
5.3.190.0110.03612.68
5.3.180.0100.03612.67
5.3.170.0100.03712.67
5.3.160.0090.03812.67
5.3.150.0110.04012.67
5.3.140.0060.04412.66
5.3.130.0080.03912.65
5.3.120.0070.04112.65
5.3.110.0080.04112.66
5.3.100.0070.04012.13
5.3.90.0080.03512.12
5.3.80.0040.04112.11
5.3.70.0070.04312.11
5.3.60.0080.03612.09
5.3.50.0090.03512.04
5.3.40.0070.03712.04
5.3.30.0080.03512.00
5.3.20.0070.03511.77
5.3.10.0070.03511.74
5.3.00.0100.05011.73
5.2.170.0060.0339.23
5.2.160.0060.0349.22
5.2.150.0060.0309.22
5.2.140.0040.0329.22
5.2.130.0030.0329.18
5.2.120.0090.0269.18
5.2.110.0040.0309.19
5.2.100.0050.0309.18
5.2.90.0050.0309.18
5.2.80.0020.0439.18
5.2.70.0050.0339.18
5.2.60.0100.0279.13
5.2.50.0040.0329.10
5.2.40.0080.0329.07
5.2.30.0040.0339.05
5.2.20.0080.0279.05
5.2.10.0050.0298.95
5.2.00.0080.0288.82
5.1.60.0060.0258.09
5.1.50.0070.0248.08
5.1.40.0050.0268.07
5.1.30.0070.0338.42
5.1.20.0080.0368.45
5.1.10.0060.0348.16
5.1.00.0100.0368.17
5.0.50.0030.0236.66
5.0.40.0070.0186.52
5.0.30.0020.0346.33
5.0.20.0040.0256.30
5.0.10.0030.0256.27
5.0.00.0070.0326.27
4.4.90.0020.0194.78
4.4.80.0050.0164.76
4.4.70.0040.0214.76
4.4.60.0030.0184.75
4.4.50.0030.0174.77
4.4.40.0010.0374.71
4.4.30.0040.0214.76
4.4.20.0020.0214.85
4.4.10.0030.0174.85
4.4.00.0020.0284.76
4.3.110.0020.0164.67
4.3.100.0050.0184.66
4.3.90.0030.0174.64
4.3.80.0010.0264.58
4.3.70.0050.0144.63
4.3.60.0020.0184.63
4.3.50.0030.0154.62
4.3.40.0020.0264.54
4.3.30.0020.0193.30
4.3.20.0020.0163.28
4.3.10.0000.0183.24
4.3.00.0030.0206.92

preferences:
57.28 ms | 401 KiB | 5 Q