3v4l.org

run code in 300+ PHP versions simultaneously
<?php $months = [ 'January', 'January', 'January', 'January', 'February' ]; $weeks = [ 'Week 1', 'Week 2', 'Week 3', 'Week 4', 'Week 1' ]; $newArray = array_map(function($index, $month) use ($weeks) { return $month . ' - ' . $weeks[$index]; }, array_keys($months), $months); print_r($newArray);

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.30.0120.00620.11
8.5.20.0070.01020.26
8.5.10.0110.00618.65
8.5.00.0110.01019.92
8.4.180.0140.01019.55
8.4.170.0120.01321.95
8.4.160.0110.01123.76
8.4.150.0090.00316.78
8.4.140.0120.01017.68
8.4.130.0140.00518.88
8.4.120.0110.00823.90
8.4.110.0040.00518.74
8.4.100.0140.00718.59
8.4.90.0120.00822.41
8.4.80.0080.00517.82
8.4.70.0170.00317.86
8.4.60.0090.01218.98
8.4.50.0050.00418.79
8.4.40.0070.01419.66
8.4.30.0140.00720.61
8.4.20.0150.00617.98
8.4.10.0090.00618.64
8.3.300.0120.01018.41
8.3.290.0120.00720.82
8.3.280.0140.00520.70
8.3.270.0110.00816.54
8.3.260.0090.00816.74
8.3.250.0090.01018.77
8.3.240.0080.00417.30
8.3.230.0080.01116.41
8.3.220.0040.00517.32
8.3.210.0060.00316.70
8.3.200.0070.00216.52
8.3.190.0110.00717.25
8.3.180.0110.00817.05
8.3.170.0150.00418.74
8.3.160.0130.00618.33
8.3.150.0120.00617.25
8.3.140.0050.00318.43
8.3.130.0040.00418.38
8.3.120.0110.00720.75
8.3.110.0110.00020.94
8.3.100.0030.00520.31
8.3.90.0140.00018.18
8.3.80.0030.00616.50
8.3.70.0070.00716.58
8.3.60.0180.00316.38
8.3.50.0110.00420.20
8.3.40.0070.00722.22
8.3.30.0110.00419.34
8.3.20.0040.00424.18
8.3.10.0070.00324.66
8.3.00.0040.00426.16
8.2.300.0130.00722.13
8.2.290.0090.00820.20
8.2.280.0110.00818.25
8.2.270.0200.00017.34
8.2.260.0120.00316.70
8.2.250.0050.00316.50
8.2.240.0090.00018.71
8.2.230.0040.00722.58
8.2.220.0090.00624.06
8.2.210.0170.00326.77
8.2.200.0030.00718.46
8.2.190.0070.00716.75
8.2.180.0100.01025.92
8.2.170.0060.00918.83
8.2.160.0150.00322.96
8.2.150.0040.00425.66
8.2.140.0070.00024.66
8.2.130.0030.00526.16
8.2.120.0070.00026.16
8.2.110.0030.00619.45
8.2.100.0080.00317.72
8.2.90.0080.00017.91
8.2.80.0040.00418.16
8.2.70.0030.00617.75
8.2.60.0000.00817.50
8.2.50.0050.00317.73
8.2.40.0040.00419.47
8.2.30.0000.00718.00
8.2.20.0040.00420.47
8.2.10.0000.00718.00
8.2.00.0000.00719.31
8.1.340.0140.00717.69
8.1.330.0110.00822.01
8.1.320.0120.00818.07
8.1.310.0040.00418.07
8.1.300.0060.01218.26
8.1.290.0060.00330.84
8.1.280.0070.01425.92
8.1.270.0040.00423.99
8.1.260.0070.00026.35
8.1.250.0070.00028.09
8.1.240.0070.00322.54
8.1.230.0110.00020.78
8.1.220.0030.00517.79
8.1.210.0040.00418.97
8.1.200.0000.00817.13
8.1.190.0040.00417.35
8.1.180.0090.00018.10
8.1.170.0000.00717.63
8.1.160.0070.00018.80
8.1.150.0060.00318.69
8.1.140.0000.00717.50
8.1.130.0000.00818.80
8.1.120.0030.00517.46
8.1.110.0070.00017.45
8.1.100.0000.00817.47
8.1.90.0000.00717.52
8.1.80.0030.00517.34
8.1.70.0040.00417.39
8.1.60.0070.00017.57
8.1.50.0040.00417.52
8.1.40.0160.00517.44
8.1.30.0230.00217.60
8.1.20.0220.00517.65
8.1.10.0170.00517.49
8.1.00.0230.00317.43
8.0.300.0000.00819.89
8.0.290.0040.00416.75
8.0.280.0050.00518.50
8.0.270.0000.00716.76
8.0.260.0060.00018.33
8.0.250.0000.00816.87
8.0.240.0040.00416.86
8.0.230.0000.00717.05
8.0.220.0030.00616.80
8.0.210.0000.00716.94
8.0.200.0000.00716.85
8.0.190.0060.00316.93
8.0.180.0000.00716.89
8.0.170.0170.00416.83
8.0.160.0180.00416.86
8.0.150.0170.00316.83
8.0.140.0120.00916.78
8.0.130.0160.00516.83
8.0.120.0120.00316.79
8.0.110.0090.00716.81
8.0.100.0150.00616.83
8.0.90.0200.00316.83
8.0.80.0170.00616.73
8.0.70.0150.00516.78
8.0.60.0170.00616.81
8.0.50.0150.00516.87
8.0.30.0150.00816.77
8.0.20.0160.00316.79
8.0.10.0190.00216.93
7.4.330.0020.00215.55
7.4.320.0070.00016.61
7.4.300.0080.00016.47
7.4.290.0030.00316.57
7.4.280.0100.00416.48
7.4.270.0150.00616.28
7.4.260.0120.00416.43
7.4.250.0150.00216.28
7.4.240.0120.00316.34
7.4.230.0130.00316.36
7.4.220.0120.00416.35
7.4.210.0090.00416.48
7.4.200.0120.00516.55
7.4.190.0130.00416.44
7.4.180.0160.00316.51
7.4.160.0170.00416.52
7.4.150.0140.00416.56
7.4.140.0080.00916.40
7.4.130.0080.00716.12
7.4.120.0050.00616.43
7.4.110.0080.00516.40
7.4.100.0100.00416.53
7.4.90.0090.00616.39
7.4.80.0090.00216.34
7.4.70.0050.00816.45
7.4.60.0090.00616.41
7.4.50.0110.00216.28
7.4.40.0090.00216.27
7.4.30.0080.00316.40
7.4.20.0030.00716.38
7.4.10.0000.01016.34
7.4.00.0100.00216.56

preferences:
47.16 ms | 1267 KiB | 5 Q