3v4l.org

run code in 300+ PHP versions simultaneously
<?php $scores = array( array(1, "allan", 90), array(2, "allan", 85), array(3, "mark", 100), array(4, "jason", 88), array(5, "allan", 92), array(6, "mark", 77), array(7, "mark", 88), array(8, "jason", 90) ); $scores = array_reduce($scores, function ($c, $v) { $name = $v[1]; if (isset($c[$name])) { $c[$name] += $v[2]; } else { $c[$name] = $v[2]; } return $c; }, array()); print_r($scores); arsort($scores); echo key($scores) . ' ' . current($scores);

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.5.10.0100.00716.58
8.5.00.0070.01420.00
8.4.150.0020.00014.05
8.4.140.0150.00717.77
8.4.130.0100.01017.80
8.4.120.0120.00820.53
8.4.110.0080.01322.25
8.4.100.0150.00517.58
8.4.90.0040.00518.84
8.4.80.0130.00917.50
8.4.70.0030.00617.85
8.4.60.0040.00518.73
8.4.50.0100.01020.63
8.4.40.0090.01217.49
8.4.30.0100.01020.57
8.4.20.0130.00720.50
8.4.10.0070.00417.46
8.3.280.0130.00618.50
8.3.270.0140.00616.61
8.3.260.0100.00916.81
8.3.250.0040.00719.03
8.3.240.0050.00316.44
8.3.230.0110.00816.50
8.3.220.0050.00317.39
8.3.210.0140.00616.63
8.3.200.0020.00716.61
8.3.190.0100.00517.12
8.3.180.0110.00918.48
8.3.170.0000.00817.22
8.3.160.0050.00316.61
8.3.150.0070.00719.00
8.3.140.0050.00516.40
8.3.130.0070.01118.44
8.3.120.0040.00420.78
8.3.110.0060.00320.94
8.3.100.0060.00316.63
8.3.90.0000.01526.77
8.3.80.0000.00918.43
8.3.70.0100.01018.43
8.3.60.0120.00618.34
8.3.50.0150.00416.32
8.3.40.0110.00418.59
8.3.30.0040.01118.63
8.3.20.0000.00720.99
8.3.10.0080.00020.34
8.3.00.0040.00423.41
8.2.290.0040.00320.71
8.2.280.0100.00718.47
8.2.270.0120.00617.21
8.2.260.0180.00016.68
8.2.250.0050.00318.45
8.2.240.0100.00719.06
8.2.230.0080.00022.58
8.2.220.0090.00024.06
8.2.210.0140.00026.77
8.2.200.0110.00018.17
8.2.190.0070.01118.41
8.2.180.0100.01425.92
8.2.170.0040.01122.96
8.2.160.0030.01020.52
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0030.00326.16
8.2.120.0050.00320.88
8.2.110.0070.00319.30
8.2.100.0040.00717.91
8.2.90.0040.00417.75
8.2.80.0070.00318.82
8.2.70.0040.00417.50
8.2.60.0080.00017.93
8.2.50.0050.00318.07
8.2.40.0070.00018.29
8.2.30.0000.00818.00
8.2.20.0040.00418.19
8.2.10.0060.00318.98
8.2.00.0000.00719.55
8.1.330.0100.00822.00
8.1.320.0090.00916.29
8.1.310.0030.00516.76
8.1.300.0100.01018.29
8.1.290.0060.00330.84
8.1.280.0120.00325.92
8.1.270.0000.00723.63
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0090.00021.05
8.1.230.0000.01117.83
8.1.220.0040.00417.74
8.1.210.0080.00018.77
8.1.200.0070.00317.35
8.1.190.0050.00317.35
8.1.180.0060.00318.10
8.1.170.0030.00618.89
8.1.160.0030.00618.89
8.1.150.0040.00418.81
8.1.140.0000.00718.84
8.1.130.0030.00320.13
8.1.120.0040.00717.51
8.1.110.0000.00717.46
8.1.100.0040.00417.51
8.1.90.0060.00317.32
8.1.80.0000.00817.53
8.1.70.0000.00717.47
8.1.60.0050.00317.55
8.1.50.0000.00817.48
8.1.40.0030.00617.52
8.1.30.0050.00317.57
8.1.20.0040.00417.63
8.1.10.0000.00817.48
8.1.00.0030.00617.54
8.0.300.0040.00418.94
8.0.290.0030.00516.75
8.0.280.0000.00718.33
8.0.270.0000.00716.75
8.0.260.0000.00618.38
8.0.250.0000.00716.98
8.0.240.0000.00716.93
8.0.230.0030.00516.91
8.0.220.0040.00416.81
8.0.210.0040.00416.80
8.0.200.0000.00716.86
8.0.190.0000.00716.83
8.0.180.0070.00016.79
8.0.170.0000.00816.80
8.0.160.0060.00316.80
8.0.150.0070.00016.82
8.0.140.0000.00716.74
8.0.130.0030.00313.29
8.0.120.0040.00416.84
8.0.110.0040.00416.84
8.0.100.0080.00016.88
8.0.90.0040.00416.76
8.0.80.0110.00616.83
8.0.70.0040.00316.71
8.0.60.0030.00516.79
8.0.50.0070.00016.85
8.0.30.0060.00916.80
8.0.20.0060.01317.21
8.0.10.0080.00017.02
8.0.00.0130.00616.76
7.4.330.0000.00415.55
7.4.320.0030.00316.53
7.4.300.0000.00616.50
7.4.290.0000.00716.49
7.4.280.0030.00516.52
7.4.270.0040.00416.50
7.4.260.0030.00316.51
7.4.250.0050.00216.56
7.4.240.0030.00616.52
7.4.230.0000.00716.69
7.4.220.0040.00416.25
7.4.210.0070.00916.50
7.4.200.0040.00416.64
7.4.140.0070.01017.86
7.4.130.0110.00716.42
7.4.120.0100.01016.33
7.4.110.0070.01116.45
7.4.100.0170.00016.57
7.4.90.0060.01216.67
7.4.80.0080.01519.39
7.4.70.0090.01516.54
7.4.60.0030.01316.54
7.4.50.0100.00616.60
7.4.40.0100.00616.51
7.4.00.0090.00614.93
7.3.330.0060.00013.23
7.3.320.0000.00513.21
7.3.310.0040.00416.38
7.3.300.0050.00316.24
7.3.290.0000.01316.50
7.3.280.0060.01016.37
7.3.260.0120.01016.47
7.3.230.0130.00316.57
7.3.210.0130.00316.46
7.3.200.0090.00616.50
7.3.190.0030.01216.66
7.3.180.0080.00816.65
7.3.170.0100.00716.46
7.3.160.0060.01216.27
7.3.50.0110.00714.60
7.3.40.0110.01114.67
7.3.30.0050.00514.87
7.3.20.0060.00616.68
7.3.10.0080.00316.71
7.3.00.0080.00316.63
7.2.330.0090.00916.88
7.2.320.0090.00916.63
7.2.310.0030.01316.39
7.2.300.0210.00316.41
7.2.290.0100.00716.52
7.2.180.0120.00614.78
7.2.170.0080.00814.77
7.2.160.0080.01215.16
7.2.150.0040.00716.96
7.2.140.0120.00416.83
7.2.130.0130.01316.70
7.2.120.0120.00916.77
7.2.110.0070.00716.92
7.2.100.0030.01616.70
7.2.90.0120.00916.99
7.2.80.0060.01516.95
7.2.70.0030.01016.98
7.2.60.0110.00316.98
7.2.50.0030.00916.84
7.2.40.0110.00017.07
7.2.30.0110.00317.07
7.2.20.0030.01616.61
7.2.10.0130.01016.70
7.2.00.0070.00716.74
7.1.280.0100.00315.79
7.1.270.0050.00515.80
7.1.260.0060.00615.75
7.1.250.0040.01415.78

preferences:
40.52 ms | 403 KiB | 5 Q