3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array = [ 2 => 5, 4 => 1, 8 => 3, 0 => 17, 9 => 2, 11 => 67 ]; $ranges = ['1-5', '6-10', '1000-5000']; var_export( array_reduce( $ranges, fn($result, $range) => $result + [$range => array_sum(array_intersect_key($array, array_flip(range(...sscanf($range, '%d-%d')))))], [] ) );

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.70.0100.00718.61
8.5.60.0110.00816.75
8.5.50.0070.00716.85
8.5.30.0110.00718.11
8.5.20.0140.00920.08
8.5.10.0140.01116.79
8.5.00.0140.00820.32
8.4.220.0110.00719.50
8.4.210.0040.00421.40
8.4.180.0120.01019.82
8.4.170.0160.00720.73
8.4.160.0090.01220.74
8.4.150.0070.00516.98
8.4.140.0130.00917.94
8.4.130.0050.00420.46
8.4.120.0150.00524.20
8.4.110.0120.00919.01
8.4.100.0130.00918.13
8.4.90.0120.00720.85
8.4.80.0130.00619.12
8.4.70.0100.01020.51
8.4.60.0100.00320.82
8.4.50.0120.00818.84
8.4.40.0090.01217.99
8.4.30.0460.00917.53
8.4.20.0380.00917.51
8.4.10.0260.00419.49
8.3.300.0150.00620.84
8.3.290.0030.00621.01
8.3.280.0120.00818.66
8.3.270.0090.01016.75
8.3.260.0080.01116.80
8.3.250.0100.01116.68
8.3.240.0130.00717.07
8.3.230.0100.00716.71
8.3.220.0080.00918.94
8.3.210.0060.00816.74
8.3.200.0040.00516.73
8.3.190.0040.00417.48
8.3.180.0090.00719.10
8.3.170.0120.00617.16
8.3.160.0280.00316.47
8.3.150.0330.00016.52
8.3.140.0170.00416.49
8.3.130.0150.00416.91
8.3.120.0160.00316.78
8.3.110.0170.00316.57
8.3.100.0190.00416.69
8.3.90.0250.00416.55
8.3.80.0200.00316.34
8.3.70.0130.00916.95
8.3.60.0170.00416.74
8.3.50.0250.00016.63
8.3.40.0130.00517.62
8.3.30.0140.00617.45
8.3.20.0150.00517.28
8.3.10.0220.00017.39
8.3.00.0080.00517.52
8.2.300.0160.00720.36
8.2.290.0060.00216.71
8.2.280.0140.00618.57
8.2.270.0150.00416.83
8.2.260.0140.00516.38
8.2.250.0180.00016.65
8.2.240.0140.00516.41
8.2.230.0120.00616.39
8.2.220.0110.00716.72
8.2.210.0130.00616.48
8.2.200.0210.00016.43
8.2.190.0160.00316.77
8.2.180.0140.00416.71
8.2.170.0180.00017.96
8.2.160.0220.00019.32
8.2.150.0190.00017.83
8.2.140.0210.00617.61
8.2.130.0210.00017.75
8.2.120.0250.00417.54
8.2.110.0210.00317.95
8.2.100.0160.00817.51
8.2.90.0220.00417.80
8.2.80.0170.00317.69
8.2.70.0140.00717.41
8.2.60.0220.00017.15
8.2.50.0110.00717.48
8.2.40.0110.00717.76
8.2.30.0100.00817.45
8.2.20.0120.00417.64
8.2.10.0160.00017.53
8.2.00.0140.00217.58
8.1.340.0100.01020.66
8.1.320.0120.00818.06

preferences:
67.58 ms | 862 KiB | 5 Q