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

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.0070.01116.88
8.3.50.0140.00222.03
8.3.40.0000.01418.93
8.3.30.0030.01019.23
8.3.20.0060.00620.30
8.3.10.0110.00023.51
8.3.00.0040.00419.19
8.2.180.0110.00418.19
8.2.170.0150.00022.96
8.2.160.0030.01020.39
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0070.00026.16
8.2.120.0000.00820.56
8.2.110.0070.00322.11
8.2.100.0040.00717.72
8.2.90.0000.00819.27
8.2.80.0000.00817.97
8.2.70.0030.00617.75
8.2.60.0000.00918.05
8.2.50.0040.00418.07
8.2.40.0040.00419.89
8.2.30.0000.00718.35
8.2.20.0000.00717.77
8.2.10.0040.00418.15
8.2.00.0060.00317.66
8.1.280.0070.00725.92
8.1.270.0030.00622.14
8.1.260.0040.00426.35
8.1.250.0060.00928.09
8.1.240.0030.00622.06
8.1.230.0070.00419.01
8.1.220.0000.00817.74
8.1.210.0060.00318.77
8.1.200.0030.00617.23
8.1.190.0060.00317.35
8.1.180.0040.00419.13
8.1.170.0000.00818.56
8.1.160.0050.00322.16
8.1.150.0040.00418.68
8.1.140.0030.00617.49
8.1.130.0080.00017.92
8.1.120.0000.00717.46
8.1.110.0070.00317.51
8.1.100.0040.00417.38
8.1.90.0000.00717.41
8.1.80.0040.00417.53
8.1.70.0040.00417.47
8.1.60.0120.00017.54
8.1.50.0040.00417.48
8.1.40.0040.00417.44
8.1.30.0040.00417.60
8.1.20.0050.00217.55
8.1.10.0000.00917.48
8.1.00.0000.00817.56
8.0.300.0040.00418.77
8.0.290.0000.00717.30
8.0.280.0070.00018.51
8.0.270.0050.00317.32
8.0.260.0030.00317.33
8.0.250.0080.00016.88
8.0.240.0000.00716.92
8.0.230.0030.00316.97
8.0.220.0000.00716.95
8.0.210.0000.00816.95
8.0.200.0030.00316.91
8.0.190.0080.00016.82
8.0.180.0040.00416.86
8.0.170.0040.00416.92
8.0.160.0040.00416.87
8.0.150.0000.00716.82
8.0.140.0030.00616.82
8.0.130.0000.00613.35
8.0.120.0040.00416.84
8.0.110.0090.00016.88
8.0.100.0040.00416.98
8.0.90.0040.00416.72
8.0.80.0060.00916.99
8.0.70.0040.00416.76
8.0.60.0040.00416.99
8.0.50.0050.00216.99
8.0.30.0090.00916.95
8.0.20.0100.00817.44
8.0.10.0070.00017.06
8.0.00.0060.01116.93
7.4.330.0030.00315.15
7.4.320.0060.00016.63
7.4.300.0000.00616.53
7.4.290.0000.00716.50
7.4.280.0040.00416.50
7.4.270.0050.00316.52
7.4.260.0070.00016.48
7.4.250.0000.00716.52
7.4.240.0050.00316.63
7.4.230.0030.00316.66
7.4.220.0120.00616.50
7.4.210.0080.00716.59
7.4.200.0030.00316.43
7.4.190.0000.00716.49
7.4.160.0060.00916.49
7.4.150.0070.01017.40
7.4.140.0110.00517.86
7.4.130.0090.00716.63
7.4.120.0090.00716.41
7.4.110.0080.01116.49
7.4.100.0190.00316.66
7.4.90.0130.00316.54
7.4.80.0150.00319.39
7.4.70.0030.01316.48
7.4.60.0160.00616.38
7.4.50.0030.00516.23
7.4.40.0100.00516.33
7.4.30.0060.01016.59
7.4.00.0060.00614.84
7.3.330.0000.00513.26
7.3.320.0030.00313.34
7.3.310.0040.00416.37
7.3.300.0000.00616.32
7.3.290.0140.00516.25
7.3.280.0120.00716.31
7.3.270.0090.00917.40
7.3.260.0030.01516.39
7.3.250.0150.00516.53
7.3.240.0170.00716.41
7.3.230.0140.00616.39
7.3.210.0120.00616.42
7.3.200.0070.01019.39
7.3.190.0170.00316.51
7.3.180.0130.00316.52
7.3.170.0130.00716.71
7.3.160.0030.01416.50
7.3.120.0040.01114.95
7.3.110.0090.00614.77
7.3.100.0070.00714.75
7.3.90.0030.01315.01
7.3.80.0030.01015.18
7.3.70.0090.00314.96
7.3.60.0070.00714.90
7.3.50.0060.00614.93
7.3.40.0040.00814.64
7.3.30.0030.01214.68
7.3.20.0060.00916.46
7.3.10.0030.01316.73
7.3.00.0030.01416.67
7.2.330.0040.01316.73
7.2.320.0030.01516.78
7.2.310.0090.00616.75
7.2.300.0060.01216.50
7.2.290.0040.01416.87
7.2.240.0030.01415.32
7.2.230.0060.00315.26
7.2.220.0060.00915.31
7.2.210.0090.00615.10
7.2.200.0000.01415.13
7.2.190.0080.00614.94
7.2.180.0030.01015.07
7.2.170.0030.01315.09
7.2.160.0110.00314.85
7.2.150.0030.01017.12
7.2.140.0040.01117.00
7.2.130.0030.00617.05
7.2.120.0030.01416.97
7.2.110.0000.00917.00
7.2.100.0040.01416.70
7.2.90.0140.00017.14
7.2.80.0070.00516.81
7.2.70.0090.00616.86
7.2.60.0050.00917.02
7.2.50.0090.00317.05
7.2.40.0090.00617.05
7.2.30.0070.01017.15
7.2.20.0040.00717.01
7.2.10.0040.01117.02
7.2.00.0080.00417.07
7.1.330.0060.00315.91
7.1.320.0030.01015.88
7.1.310.0040.01215.62
7.1.300.0060.00315.86
7.1.290.0100.00315.69
7.1.280.0080.00515.75
7.1.270.0090.00615.74
7.1.260.0100.00315.83
7.1.250.0110.00415.80
7.1.200.0060.00315.84
7.1.70.0080.00817.06
7.1.60.0110.00019.46
7.1.50.0150.00617.08
7.1.00.0000.08022.37
7.0.200.0070.00316.68
7.0.140.0000.07722.21
7.0.60.0170.07719.91
7.0.50.0070.05017.87
7.0.40.0170.08320.09
7.0.30.0270.07320.07
7.0.20.0400.05320.11
7.0.10.0030.08020.07
7.0.00.0130.06020.06
5.6.210.0170.06020.48
5.6.200.0000.06318.15
5.6.190.0030.05020.49
5.6.180.0100.07320.46
5.6.170.0330.04720.44
5.6.160.0070.07720.54
5.6.150.0130.05318.14
5.6.140.0100.05718.15
5.6.130.0030.04718.17
5.6.120.0070.07720.97
5.6.110.0030.04020.98
5.6.100.0030.08321.01
5.6.90.0070.04321.08
5.6.80.0130.06720.40
5.5.350.3930.03720.49
5.5.340.0100.08017.98
5.5.330.0000.05020.13
5.5.320.0300.07720.29
5.5.310.0370.04020.24
5.5.300.0070.08718.07
5.5.290.0070.08017.96
5.5.280.0030.04020.69
5.5.270.0070.08320.73
5.5.260.0100.07320.89
5.5.250.0230.06020.69
5.5.240.0070.03720.16
5.4.450.0100.06019.45
5.4.440.0100.06019.52
5.4.430.0100.05719.41
5.4.420.1330.05019.62
5.4.410.0800.04719.41
5.4.400.0930.04719.11
5.4.390.0000.06319.16
5.4.380.0030.06318.70
5.4.370.0100.06718.70
5.4.360.0170.04718.81
5.4.350.0270.04718.90
5.4.340.0070.06018.79
5.4.320.0100.04512.51
5.4.310.0060.04112.50
5.4.300.0070.03612.51
5.4.290.0090.03812.50
5.4.280.0100.03712.40
5.4.270.0120.04912.40
5.4.260.0100.05312.40
5.4.250.0090.04812.40
5.4.240.0070.03812.40
5.4.230.0080.03812.39
5.4.220.0100.04412.39
5.4.210.0100.04012.39
5.4.200.0060.04212.39
5.4.190.0080.03712.39
5.4.180.0120.04412.39
5.4.170.0050.05312.40
5.4.160.0070.04812.39
5.4.150.0040.05212.39
5.4.140.0090.03712.07
5.4.130.0100.03712.06
5.4.120.0070.04712.02
5.4.110.0040.04112.02
5.4.100.0080.03812.02
5.4.90.0070.04512.02
5.4.80.0070.03912.02
5.4.70.0090.03912.01
5.4.60.0080.03812.01
5.4.50.0100.03412.01
5.4.40.0070.03512.00
5.4.30.0060.03912.00
5.4.20.0080.03512.00
5.4.10.0060.04012.00
5.4.00.0040.04111.49
5.3.290.0070.05212.80
5.3.280.0070.04212.71
5.3.270.0110.03712.73
5.3.260.0090.04112.72
5.3.250.0100.03812.72
5.3.240.0100.03812.72
5.3.230.0080.04112.71
5.3.220.0110.04012.68
5.3.210.0080.03912.68
5.3.200.0040.03912.68
5.3.190.0050.04012.68
5.3.180.0040.03912.68
5.3.170.0090.03412.67
5.3.160.0060.03712.67
5.3.150.0120.03512.67
5.3.140.0100.03412.66
5.3.130.0050.04012.66
5.3.120.0070.03812.66
5.3.110.0070.04112.66
5.3.100.0070.03612.13
5.3.90.0090.03412.12
5.3.80.0070.03612.11
5.3.70.0070.03712.11
5.3.60.0060.04312.09
5.3.50.0040.03912.04
5.3.40.0060.03712.04
5.3.30.0080.03512.00
5.3.20.0050.03811.78
5.3.10.0070.03911.74
5.3.00.0090.03511.73
5.2.170.0030.0339.23
5.2.160.0050.0309.22
5.2.150.0020.0349.22
5.2.140.0080.0299.22
5.2.130.0040.0319.18
5.2.120.0060.0299.18
5.2.110.0050.0309.19
5.2.100.0070.0289.18
5.2.90.0080.0279.18
5.2.80.0050.0389.18
5.2.70.0070.0329.18
5.2.60.0080.0349.13
5.2.50.0060.0499.09
5.2.40.0090.0399.07
5.2.30.0120.0589.05
5.2.20.0080.0449.05
5.2.10.0070.0308.95
5.2.00.0050.0308.82
5.1.60.0050.0258.09
5.1.50.0050.0258.08
5.1.40.0050.0278.07
5.1.30.0050.0318.43
5.1.20.0050.0288.44
5.1.10.0090.0278.16
5.1.00.0040.0278.16
5.0.50.0040.0226.66
5.0.40.0020.0216.52
5.0.30.0030.0326.33
5.0.20.0060.0186.29
5.0.10.0040.0246.27
5.0.00.0050.0356.27
4.4.90.0030.0224.78
4.4.80.0020.0194.76
4.4.70.0050.0224.75
4.4.60.0050.0194.75
4.4.50.0000.0214.77
4.4.40.0030.0344.71
4.4.30.0030.0154.75
4.4.20.0020.0214.84
4.4.10.0040.0154.85
4.4.00.0020.0264.76
4.3.110.0050.0154.67
4.3.100.0020.0154.66
4.3.90.0000.0164.64
4.3.80.0020.0254.58
4.3.70.0010.0164.63
4.3.60.0040.0134.63
4.3.50.0000.0184.63
4.3.40.0040.0234.54
4.3.30.0020.0183.30
4.3.20.0040.0143.28
4.3.10.0020.0163.24
4.3.00.0030.0236.90

preferences:
31.85 ms | 401 KiB | 5 Q