3v4l.org

run code in 300+ PHP versions simultaneously
<?php class JupilerLeague extends SplHeap { /** * We modify the abstract method compare so we can sort our * rankings using the values of a given array */ public function compare($array1, $array2) { $values1 = array_values($array1); $values2 = array_values($array2); if ($values1[0] === $values2[0]) return 0; return $values1[0] < $values2[0] ? -1 : 1; } } // Let's populate our heap here (data of 2009) $heap = new JupilerLeague(); $heap->insert(array ('AA Gent' => 15)); $heap->insert(array ('Anderlecht' => 20)); $heap->insert(array ('Cercle Brugge' => 11)); $heap->insert(array ('Charleroi' => 12)); $heap->insert(array ('Club Brugge' => 21)); $heap->insert(array ('G. Beerschot' => 15)); print_r(iterator_to_array(clone $heap)); print_r(iterator_to_array(clone $heap));

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.01018.43
8.3.50.0140.00522.11
8.3.40.0060.01218.76
8.3.30.0100.01019.09
8.3.20.0040.00420.25
8.3.10.0080.00022.09
8.3.00.0100.00722.45
8.2.180.0210.00018.30
8.2.170.0070.00722.96
8.2.160.0100.00320.43
8.2.150.0030.00524.18
8.2.140.0090.00024.66
8.2.130.0000.00826.16
8.2.120.0030.00619.49
8.2.110.0030.00722.16
8.2.100.0040.00717.72
8.2.90.0000.00819.22
8.2.80.0060.00317.97
8.2.70.0000.00917.63
8.2.60.0080.00318.03
8.2.50.0040.00418.07
8.2.40.0040.00418.22
8.2.30.0040.00418.10
8.2.20.0000.00717.57
8.2.10.0040.00417.85
8.2.00.0000.00817.59
8.1.280.0120.00925.92
8.1.270.0090.00922.00
8.1.260.0040.00426.35
8.1.250.0030.00728.09
8.1.240.0000.00922.18
8.1.230.0070.00417.52
8.1.220.0080.00017.74
8.1.210.0050.00318.77
8.1.200.0000.00917.35
8.1.190.0070.00017.66
8.1.180.0030.00618.10
8.1.170.0000.00818.66
8.1.160.0000.00721.91
8.1.150.0000.00718.63
8.1.140.0070.00017.35
8.1.130.0030.00317.87
8.1.120.0070.00017.47
8.1.110.0040.00417.33
8.1.100.0060.00317.45
8.1.90.0030.00517.40
8.1.80.0000.00717.52
8.1.70.0030.00317.37
8.1.60.0030.00617.54
8.1.50.0040.00417.53
8.1.40.0050.00317.60
8.1.30.0060.00317.66
8.1.20.0050.00317.63
8.1.10.0000.00817.64
8.1.00.0050.00317.44
8.0.300.0000.00718.77
8.0.290.0050.00316.75
8.0.280.0030.00318.46
8.0.270.0000.00717.16
8.0.260.0030.00316.90
8.0.250.0030.00316.82
8.0.240.0070.00016.84
8.0.230.0000.00716.98
8.0.220.0030.00316.77
8.0.210.0000.00716.77
8.0.200.0030.00316.82
8.0.190.0000.00716.83
8.0.180.0070.00016.84
8.0.170.0070.00016.89
8.0.160.0030.00616.69
8.0.150.0000.00716.79
8.0.140.0000.00816.81
8.0.130.0000.00613.25
8.0.120.0030.00516.76
8.0.110.0020.00516.79
8.0.100.0000.00716.87
8.0.90.0000.00816.90
8.0.80.0060.00916.80
8.0.70.0070.00016.89
8.0.60.0040.00416.78
8.0.50.0040.00416.87
8.0.30.0090.01217.19
8.0.20.0080.01017.45
8.0.10.0030.00517.10
8.0.00.0120.01016.96
7.4.330.0030.00315.14
7.4.320.0060.00016.53
7.4.300.0070.00016.51
7.4.290.0000.00716.47
7.4.280.0000.00716.62
7.4.270.0000.00716.57
7.4.260.0030.00316.54
7.4.250.0080.00016.41
7.4.240.0040.00416.53
7.4.230.0000.00716.72
7.4.220.0130.00416.58
7.4.210.0090.00816.66
7.4.200.0050.00316.72
7.4.190.0070.00016.63
7.4.160.0100.01016.56
7.4.150.0090.00917.40
7.4.140.0100.00817.86
7.4.130.0100.00816.55
7.4.120.0120.00816.55
7.4.110.0060.01216.67
7.4.100.0120.01216.46
7.4.90.0160.00816.56
7.4.80.0180.00419.39
7.4.70.0160.00016.50
7.4.60.0100.00916.59
7.4.50.0000.00416.24
7.4.40.0070.01122.77
7.4.30.0050.01116.70
7.4.00.0080.00814.96
7.3.330.0000.00513.27
7.3.320.0000.00513.21
7.3.310.0040.00416.43
7.3.300.0000.00716.36
7.3.290.0050.01016.33
7.3.280.0080.00816.32
7.3.270.0030.01417.40
7.3.260.0180.00616.31
7.3.250.0090.00916.47
7.3.240.0040.01816.68
7.3.230.0110.00716.50
7.3.210.0110.00916.51
7.3.200.0110.00719.39
7.3.190.0030.01316.31
7.3.180.0060.00916.36
7.3.170.0100.01016.31
7.3.160.0090.00616.63
7.3.120.0060.01014.93
7.3.110.0000.01514.91
7.3.100.0070.00414.72
7.3.90.0060.00614.71
7.3.80.0040.01115.00
7.3.70.0100.00714.90
7.3.60.0030.01314.66
7.3.50.0000.01614.58
7.3.40.0030.00614.64
7.3.30.0030.00914.78
7.3.20.0060.00316.56
7.3.10.0050.00816.56
7.3.00.0040.00616.67
7.2.330.0090.00916.56
7.2.320.0120.01616.38
7.2.310.0100.01116.52
7.2.300.0030.01316.48
7.2.290.0100.00716.70
7.2.250.0070.01014.97
7.2.240.0070.01114.94
7.2.230.0070.00714.95
7.2.220.0070.00715.23
7.2.210.0030.01314.98
7.2.200.0060.00814.84
7.2.190.0000.01814.83
7.2.180.0070.00614.99
7.2.170.0030.00814.74
7.2.130.0040.01116.87
7.2.120.0040.00816.94
7.2.110.0060.00916.78
7.2.100.0070.00716.78
7.2.90.0030.00616.87
7.2.80.0090.00316.78
7.2.70.0040.00817.06
7.2.60.0060.00316.92
7.2.50.0030.01017.00
7.2.40.0060.00317.02
7.2.30.0000.01417.06
7.2.20.0000.01316.58
7.2.10.0000.01516.66
7.2.00.0050.00717.95
7.1.330.0070.00715.76
7.1.320.0070.00715.53
7.1.310.0070.01015.83
7.1.300.0070.01015.63
7.1.290.0040.00815.77
7.1.280.0070.00715.86
7.1.270.0060.00615.82
7.1.260.0000.01415.80
7.1.250.0000.00915.98
7.1.100.0190.01117.93
7.1.70.0070.00017.19
7.1.60.0110.00419.82
7.1.50.0070.01716.98
7.1.00.0000.07722.45
7.0.200.0000.00716.89
7.0.140.0100.06722.07
7.0.60.0030.08019.89
7.0.50.0070.04717.88
7.0.40.0070.09319.96
7.0.30.0270.05020.09
7.0.20.0230.04020.05
7.0.10.0100.08320.19
7.0.00.0100.08320.12
5.6.280.0030.07321.11
5.6.210.0100.08020.61
5.6.200.0070.07018.18
5.6.190.0100.08320.41
5.6.180.3930.04320.67
5.6.170.0300.07720.52
5.6.160.0100.06720.71
5.6.150.0030.05718.18
5.6.140.0100.05718.18
5.6.130.0100.05718.16
5.6.120.0070.08021.12
5.6.110.0030.08721.12
5.6.100.0030.06021.00
5.6.90.0070.04721.11
5.6.80.0100.07720.36
5.6.70.2270.04320.28
5.5.350.0330.07020.36
5.5.340.0130.07317.93
5.5.330.0100.08320.21
5.5.320.0500.06020.38
5.5.310.0230.07720.37
5.5.300.0030.04317.94
5.5.290.0170.06317.97
5.5.280.0130.04020.74
5.5.270.0100.04320.65
5.5.260.0100.08020.73
5.5.250.0070.08720.50
5.5.240.0270.06720.29
5.4.450.0530.05719.70
5.4.440.0870.04719.41
5.4.430.0270.06719.37
5.4.420.0030.06319.51
5.4.410.0130.05319.32
5.4.400.0900.00018.63
5.4.390.0700.00018.53
5.4.380.0200.06018.73
5.4.370.0270.05018.80
5.4.360.0270.05018.56
5.4.350.0130.05718.48
5.4.340.0300.05018.75
5.4.320.0100.03712.50
5.4.310.0060.04212.50
5.4.300.0040.03812.50
5.4.290.0070.04312.50
5.4.280.0070.03412.40
5.4.270.0030.06719.09
5.4.260.0070.07318.99
5.4.250.0070.05718.98
5.4.240.0070.07018.65
5.4.230.0130.06718.75
5.4.220.0270.06318.76
5.4.210.0000.06018.96
5.4.200.0200.05718.80
5.4.190.0170.07018.99
5.4.180.0200.06018.93
5.4.170.0130.07018.89
5.4.160.0130.06018.98
5.4.150.0170.05018.93
5.4.140.0100.07016.32
5.4.130.0100.05016.43
5.4.120.0100.05316.63
5.4.110.0200.04716.51
5.4.100.0070.05016.53
5.4.90.0100.04716.61
5.4.80.0070.06716.49
5.4.70.0170.05016.49
5.4.60.0130.05316.38
5.4.50.0100.05316.43
5.4.40.0170.05716.41
5.4.30.0200.06316.55
5.4.20.0070.05016.35
5.4.10.0070.05716.35
5.4.00.0030.05316.00
5.3.290.0050.04212.80
5.3.280.0070.06014.69
5.3.270.0130.05714.83
5.3.260.0030.06314.59
5.3.250.0070.05014.70
5.3.240.0100.05714.79
5.3.230.0200.06014.59
5.3.220.0170.06714.73
5.3.210.0070.06314.66
5.3.200.0070.05314.64
5.3.190.0200.04314.79
5.3.180.0130.05314.55
5.3.170.0170.05314.42
5.3.160.0130.05714.65
5.3.150.0030.05714.56
5.3.140.0130.05014.64
5.3.130.0100.08314.64
5.3.120.0070.05714.45
5.3.110.0070.05714.77
5.3.100.0100.07014.13
5.3.90.0130.07014.01
5.3.80.0100.04714.21
5.3.70.0030.06313.92
5.3.60.0170.04314.09
5.3.50.0130.04313.94
5.3.40.0130.04314.02
5.3.30.0000.05313.99
5.3.20.0070.06713.77
5.3.10.0070.06013.74
5.3.00.0030.05713.67
5.2.170.0030.05311.30
5.2.160.0130.03711.23
5.2.150.0000.04711.05
5.2.140.0100.04311.11
5.2.130.0030.06011.32
5.2.120.0070.04711.19
5.2.110.0100.04011.18
5.2.100.0000.04711.32
5.2.90.0070.03711.01
5.2.80.0100.05311.18
5.2.70.0170.03711.18
5.2.60.0130.04711.11
5.2.50.0100.04011.08
5.2.40.0130.03710.99
5.2.30.0070.04711.16
5.2.20.0100.04310.94
5.2.10.0070.04010.92
5.2.00.0170.05010.71
5.1.60.0000.0379.84
5.1.50.0100.0439.99
5.1.40.0030.03710.05
5.1.30.0000.04010.43
5.1.20.0030.04010.45
5.1.10.0030.04710.30
5.1.00.0100.0479.98
5.0.50.0000.0378.53
5.0.40.0070.0238.50
5.0.30.0070.0508.19
5.0.20.0100.0238.17
5.0.10.0000.0408.26
5.0.00.0030.0408.20
4.4.90.0070.0206.67
4.4.80.0000.0336.67
4.4.70.0000.0236.67
4.4.60.0030.0306.67
4.4.50.0000.0276.67
4.4.40.0030.0436.67
4.4.30.0030.0206.67
4.4.20.0030.0306.67
4.4.10.0070.0206.67
4.4.00.0000.0436.67
4.3.110.0000.0236.67
4.3.100.0070.0276.67
4.3.90.0070.0276.67
4.3.80.0030.0376.67
4.3.70.0000.0236.67
4.3.60.0030.0206.67
4.3.50.0070.0276.67
4.3.40.0000.0336.67
4.3.30.0030.0236.67
4.3.20.0000.0306.67
4.3.10.0000.0236.67
4.3.00.0130.0206.43

preferences:
46.27 ms | 401 KiB | 5 Q