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($heap)); print_r(iterator_to_array($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.0070.01318.45
8.3.50.0050.01321.99
8.3.40.0110.00718.92
8.3.30.0070.01419.19
8.3.20.0030.00620.31
8.3.10.0040.00422.00
8.3.00.0040.00422.30
8.2.180.0060.01616.88
8.2.170.0120.00322.96
8.2.160.0070.00720.21
8.2.150.0110.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0060.00319.38
8.2.110.0060.00322.27
8.2.100.0120.00019.51
8.2.90.0000.00919.09
8.2.80.0080.00017.97
8.2.70.0060.00317.63
8.2.60.0040.00817.68
8.2.50.0080.00018.07
8.2.40.0040.00418.34
8.2.30.0000.00718.12
8.2.20.0050.00317.59
8.2.10.0040.00419.36
8.2.00.0040.00417.73
8.1.280.0130.00725.92
8.1.270.0040.00422.21
8.1.260.0030.00526.35
8.1.250.0030.00628.09
8.1.240.0050.00323.80
8.1.230.0040.00719.08
8.1.220.0000.00817.79
8.1.210.0030.00518.77
8.1.200.0030.00617.36
8.1.190.0030.00617.41
8.1.180.0080.00018.10
8.1.170.0040.00418.50
8.1.160.0040.00421.98
8.1.150.0040.00418.48
8.1.140.0040.00417.48
8.1.130.0040.00417.86
8.1.120.0000.00817.46
8.1.110.0000.00717.31
8.1.100.0030.00617.47
8.1.90.0000.00717.42
8.1.80.0040.00417.46
8.1.70.0070.00017.41
8.1.60.0030.00617.56
8.1.50.0030.00517.58
8.1.40.0000.00717.46
8.1.30.0000.00717.58
8.1.20.0040.00417.70
8.1.10.0050.00217.56
8.1.00.0050.00217.55
8.0.300.0040.00418.77
8.0.290.0000.00717.05
8.0.280.0030.00318.37
8.0.270.0030.00317.22
8.0.260.0030.00316.72
8.0.250.0000.00716.81
8.0.240.0000.00816.90
8.0.230.0040.00416.94
8.0.220.0000.00716.80
8.0.210.0000.00716.81
8.0.200.0030.00316.78
8.0.190.0070.00016.82
8.0.180.0040.00416.77
8.0.170.0040.00416.81
8.0.160.0040.00416.72
8.0.150.0030.00316.78
8.0.140.0000.00716.79
8.0.130.0000.00613.38
8.0.120.0030.00516.81
8.0.110.0000.00716.77
8.0.100.0040.00416.75
8.0.90.0040.00416.86
8.0.80.0150.00816.80
8.0.70.0060.00316.73
8.0.60.0000.00816.80
8.0.50.0030.00516.68
8.0.30.0120.00717.04
8.0.20.0070.01117.43
8.0.10.0000.00716.79
8.0.00.0120.00916.85
7.4.330.0050.00015.21
7.4.320.0030.00316.51
7.4.300.0030.00316.61
7.4.290.0000.00716.67
7.4.280.0000.00716.50
7.4.270.0030.00316.62
7.4.260.0050.00316.54
7.4.250.0040.00416.45
7.4.240.0000.00716.53
7.4.230.0000.00716.40
7.4.220.0040.01316.72
7.4.210.0090.00816.58
7.4.200.0030.00616.53
7.4.190.0000.00716.59
7.4.160.0080.00816.38
7.4.150.0120.00917.40
7.4.140.0130.01817.86
7.4.130.0100.00716.50
7.4.120.0130.00416.55
7.4.110.0100.00716.23
7.4.100.0150.00416.60
7.4.90.0100.00616.60
7.4.80.0100.01019.39
7.4.70.0060.01616.67
7.4.60.0100.00716.45
7.4.50.0070.00016.31
7.4.40.0000.00922.77
7.4.30.0040.01316.33
7.4.00.0080.00514.83
7.3.330.0050.00013.22
7.3.320.0030.00313.15
7.3.310.0070.00016.43
7.3.300.0070.00016.40
7.3.290.0060.01316.41
7.3.280.0100.00816.33
7.3.270.0040.01317.40
7.3.260.0060.01016.47
7.3.250.0100.00716.46
7.3.240.0140.00716.46
7.3.230.0130.00316.46
7.3.210.0180.00016.47
7.3.200.0160.01119.39
7.3.190.0090.00916.46
7.3.180.0030.01416.41
7.3.170.0120.00916.34
7.3.160.0100.00916.32
7.3.120.0060.01014.81
7.3.110.0030.01414.83
7.3.100.0090.00914.86
7.3.90.0040.01414.58
7.3.80.0000.01114.84
7.3.70.0000.01514.94
7.3.60.0060.00314.98
7.3.50.0070.01014.51
7.3.40.0060.01014.92
7.3.30.0070.01014.66
7.3.20.0000.00916.32
7.3.10.0100.00416.77
7.3.00.0000.01516.57
7.2.330.0120.00616.45
7.2.320.0110.01116.67
7.2.310.0190.00816.46
7.2.300.0100.00716.40
7.2.290.0070.01116.64
7.2.250.0100.00714.93
7.2.240.0060.00914.97
7.2.230.0100.00315.15
7.2.220.0000.01714.98
7.2.210.0070.00714.93
7.2.200.0070.00715.10
7.2.190.0070.00715.00
7.2.180.0070.01015.12
7.2.170.0030.01314.75
7.2.00.0110.00419.16
7.1.330.0110.00415.55
7.1.320.0030.00615.86
7.1.310.0080.00415.99
7.1.300.0030.00615.93
7.1.290.0100.00715.63
7.1.280.0100.00315.91
7.1.270.0030.01015.84
7.1.260.0040.00915.60
7.1.100.0240.01217.88
7.1.70.0030.00517.19
7.1.60.0120.00919.82
7.1.50.0130.01016.76
7.1.00.0000.08022.54
7.0.200.0050.00216.67
7.0.140.0030.07321.95
7.0.60.0230.06319.96
7.0.50.0030.07017.93
7.0.40.0000.08320.06
7.0.30.0400.07720.30
7.0.20.0230.05320.23
7.0.10.0230.04720.10
7.0.00.0170.07720.22
5.6.280.0030.07321.16
5.6.210.0100.07320.73
5.6.200.0100.08018.14
5.6.190.0030.08020.67
5.6.180.3830.04320.68
5.6.170.0170.04720.56
5.6.160.0130.07320.71
5.6.150.0100.07718.15
5.6.140.0100.07718.17
5.6.130.0000.06018.14
5.6.120.0200.07721.02
5.6.110.0070.07321.14
5.6.100.0000.06021.01
5.6.90.0270.07720.93
5.6.80.0000.09020.38
5.6.70.0270.07320.37
5.5.350.0000.09320.44
5.5.340.0070.08718.10
5.5.330.0000.06020.42
5.5.320.0130.04320.24
5.5.310.0430.07320.32
5.5.300.0070.04317.95
5.5.290.0170.07017.95
5.5.280.0030.08720.69
5.5.270.0130.03320.84
5.5.260.0230.07020.78
5.5.250.0030.06020.77
5.5.240.0100.05020.37
5.4.450.0500.07019.36
5.4.440.0530.05719.56
5.4.430.0100.06319.46
5.4.420.0130.05319.52
5.4.410.0230.06719.41
5.4.400.0800.00018.48
5.4.390.0900.00018.56
5.4.380.0300.05018.63
5.4.370.0170.05718.73
5.4.360.0200.05318.79
5.4.350.0230.05718.75
5.4.340.0300.04318.58
5.4.320.0090.04412.50
5.4.310.0080.03612.50
5.4.300.0140.04012.50
5.4.290.0070.04012.50
5.4.280.0060.03512.40
5.4.270.0100.07018.94
5.4.260.0130.07018.66
5.4.250.0130.07018.95
5.4.240.0070.05718.95
5.4.230.0170.05718.89
5.4.220.0000.07318.95
5.4.210.0130.04719.09
5.4.200.0100.05718.74
5.4.190.0070.05718.82
5.4.180.0100.05718.94
5.4.170.0100.06318.98
5.4.160.0170.04718.75
5.4.150.0070.05718.92
5.4.140.0070.05716.55
5.4.130.0100.04716.61
5.4.120.0170.06016.48
5.4.110.0100.04716.51
5.4.100.0070.06016.41
5.4.90.0100.08016.41
5.4.80.0030.05316.55
5.4.70.0070.07316.40
5.4.60.0070.05016.50
5.4.50.0100.05016.30
5.4.40.0170.05016.43
5.4.30.0100.06716.41
5.4.20.0200.05716.38
5.4.10.0170.06716.40
5.4.00.0130.06016.04
5.3.290.0060.04312.80
5.3.280.0130.06714.57
5.3.270.0100.07714.70
5.3.260.0000.08314.69
5.3.250.0230.04714.44
5.3.240.0270.05314.70
5.3.230.0070.05014.82
5.3.220.0100.07014.73
5.3.210.0030.06014.40
5.3.200.0100.07714.65
5.3.190.0030.06014.57
5.3.180.0100.06314.63
5.3.170.0100.06714.70
5.3.160.0270.04714.74
5.3.150.0130.07014.65
5.3.140.0100.05014.55
5.3.130.0270.05714.63
5.3.120.0130.05014.57
5.3.110.0030.07014.57
5.3.100.0130.06714.12
5.3.90.0200.05714.08
5.3.80.0170.06314.04
5.3.70.0130.05714.20
5.3.60.0100.05314.17
5.3.50.0070.05313.94
5.3.40.0130.06714.11
5.3.30.0130.05714.13
5.3.20.0130.06013.78
5.3.10.0130.06713.56
5.3.00.0170.07013.54
5.2.170.0070.05711.10
5.2.160.0030.05711.23
5.2.150.0170.03311.23
5.2.140.0170.05010.97
5.2.130.0000.04311.19
5.2.120.0070.04711.18
5.2.110.0070.05311.11
5.2.100.0130.04711.07
5.2.90.0100.05311.06
5.2.80.0100.05311.18
5.2.70.0170.04011.08
5.2.60.0070.04311.11
5.2.50.0100.05711.03
5.2.40.0070.04011.09
5.2.30.0070.04011.14
5.2.20.0100.04011.18
5.2.10.0070.03710.86
5.2.00.0000.04310.79
5.1.60.0170.0339.92
5.1.50.0070.04310.06
5.1.40.0030.03710.22
5.1.30.0100.03010.32
5.1.20.0030.04310.38
5.1.10.0200.02010.03
5.1.00.0030.03710.02
5.0.50.0070.0378.46
5.0.40.0070.0278.65
5.0.30.0070.0478.20
5.0.20.0070.0238.23
5.0.10.0030.0408.24
5.0.00.0070.0378.14
4.4.90.0000.0336.67
4.4.80.0070.0206.67
4.4.70.0030.0206.67
4.4.60.0100.0176.67
4.4.50.0030.0206.67
4.4.40.0000.0476.67
4.4.30.0070.0176.67
4.4.20.0030.0236.67
4.4.10.0070.0176.67
4.4.00.0030.0436.67
4.3.110.0030.0306.67
4.3.100.0070.0276.67
4.3.90.0030.0206.67
4.3.80.0100.0336.67
4.3.70.0000.0206.67
4.3.60.0100.0206.67
4.3.50.0070.0276.67
4.3.40.0030.0436.67
4.3.30.0000.0276.67
4.3.20.0030.0176.67
4.3.10.0070.0236.67
4.3.00.0100.0206.43

preferences:
52.67 ms | 401 KiB | 5 Q