3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ids = array(4, 13, 6, 8, 10); $names = array('alice', 'bob', 'charles', 'david', 'elizabeth'); $special_name = 2; $special_id = 13; $mapped = array_combine($ids, $names); $mapped[$special_id] = $names[$special_name]; var_export($mapped);

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.0080.01116.71
8.5.00.0110.01019.78
8.4.150.0030.00014.05
8.4.140.0110.01117.46
8.4.130.0110.00817.70
8.4.120.0120.00822.36
8.4.110.0050.00422.32
8.4.100.0140.00620.45
8.4.90.0120.00820.35
8.4.80.0130.00717.63
8.4.70.0140.00417.89
8.4.60.0110.00918.66
8.4.50.0120.01018.53
8.4.40.0100.01017.43
8.4.30.0040.00418.56
8.4.20.0060.01320.72
8.4.10.0080.00019.19
8.3.280.0100.01120.09
8.3.270.0110.00816.43
8.3.260.0100.00916.57
8.3.250.0120.00618.81
8.3.240.0120.00718.70
8.3.230.0140.00616.66
8.3.220.0140.00617.20
8.3.210.0120.00716.74
8.3.200.0080.00316.48
8.3.190.0080.01017.02
8.3.180.0090.01116.49
8.3.170.0070.01018.79
8.3.160.0120.00616.58
8.3.150.0160.00318.35
8.3.140.0070.01118.98
8.3.130.0040.00416.43
8.3.120.0040.00420.86
8.3.110.0000.00820.94
8.3.100.0040.00424.06
8.3.90.0040.00426.77
8.3.80.0030.00617.97
8.3.70.0090.00916.63
8.3.60.0150.00016.50
8.3.50.0170.00318.36
8.3.40.0040.01119.92
8.3.30.0030.01021.86
8.3.20.0050.00224.18
8.3.10.0070.00024.66
8.3.00.0050.00326.16
8.2.290.0110.00820.71
8.2.280.0090.00818.50
8.2.270.0120.00617.30
8.2.260.0050.00318.14
8.2.250.0040.00417.27
8.2.240.0030.00617.08
8.2.230.0040.00422.58
8.2.220.0090.00337.54
8.2.210.0050.00326.77
8.2.200.0000.00916.38
8.2.190.0150.00016.63
8.2.180.0110.00416.38
8.2.170.0090.00618.79
8.2.160.0000.01722.96
8.2.150.0040.00425.66
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00421.03
8.2.110.0140.00621.38
8.2.100.0130.00820.06
8.2.90.0280.00718.87
8.2.80.0210.00818.58
8.2.70.0240.00818.59
8.2.60.0210.01118.64
8.2.50.0130.00619.87
8.2.40.0190.00318.76
8.2.30.0110.00518.58
8.2.20.0170.00319.06
8.2.10.0180.00419.03
8.2.00.0100.00618.90
8.1.330.0110.00821.81
8.1.320.0120.00716.11
8.1.310.0040.00416.77
8.1.300.0060.00316.16
8.1.290.0030.00630.84
8.1.280.0040.01125.92
8.1.270.0040.00423.99
8.1.260.0000.00726.35
8.1.250.0070.00028.09
8.1.240.0110.00318.49
8.1.230.0200.00218.48
8.1.220.0130.00418.60
8.1.210.0120.00219.84
8.1.200.0150.00518.48
8.1.190.0120.00318.33
8.1.180.0140.00218.27
8.1.170.0150.00318.34
8.1.160.0090.00718.74
8.1.150.0060.00520.46
8.1.140.0120.00218.47
8.1.130.0170.00318.39
8.1.120.0140.00318.43
8.1.110.0100.00119.74
8.1.100.0110.00318.57
8.1.90.0070.00518.40
8.1.80.0060.00718.45
8.1.70.0080.00318.53
8.1.60.0120.00318.63
8.1.50.0060.00918.39
8.1.40.0080.00418.74
8.1.30.0080.00418.86
8.1.20.0150.00018.48
8.1.10.0130.00518.57
8.1.00.0140.00618.44
8.0.300.0200.00417.75
8.0.290.0150.00517.79
8.0.280.0060.00817.75
8.0.270.0120.00317.61
8.0.260.0040.00618.47
8.0.250.0100.00317.73
8.0.240.0090.00517.69
8.0.230.0110.00218.21
8.0.220.0120.00617.67
8.0.210.0120.00317.75
8.0.200.0110.00417.74
8.0.190.0090.00318.27
8.0.180.0110.00417.84
8.0.170.0130.00417.73
8.0.160.0090.00717.81
8.0.150.0140.00117.79
8.0.140.0120.00317.68
8.0.130.0080.00418.28
8.0.120.0130.00117.69
8.0.110.0110.00318.30
8.0.100.0240.00017.69
8.0.90.0150.00617.79
8.0.80.0140.00117.71
8.0.70.0070.00817.80
8.0.60.0090.00318.19
8.0.50.0090.00517.65
8.0.30.0130.00018.24
8.0.20.0110.00417.80
8.0.10.0140.00017.96

preferences:
38.82 ms | 403 KiB | 5 Q