3v4l.org

run code in 300+ PHP versions simultaneously
<?php $defaults = ['a' => 1, 'b' => 2, 'c' => 3, 'd' => 4, 'e' => 5]; $optionKeys = array_keys($defaults); $options = $defaults; $args = ['b' => 3, 'e' => 7]; array_walk($args, function($value, $key) use ($optionKeys, &$options){ var_dump($value, $key, $optionKeys, $options); if(in_array($key, $optionKeys)){ $options[$optionKeys[$key]] = $value; } }); print_r($options);

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.40.0070.00718.96
8.3.30.0140.00319.12
8.3.20.0080.00020.29
8.3.10.0080.00023.66
8.3.00.0050.00319.38
8.2.170.0130.00322.96
8.2.160.0110.00320.34
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0040.01126.16
8.2.120.0070.00022.25
8.2.110.0060.00322.30
8.2.100.0040.00718.03
8.2.90.0080.00019.35
8.2.80.0080.00017.97
8.2.70.0040.00417.75
8.2.60.0050.00317.78
8.2.50.0000.00918.07
8.2.40.0000.00718.34
8.2.30.0030.00618.13
8.2.20.0000.00817.88
8.2.10.0040.00418.01
8.2.00.0050.00517.74
8.1.270.0090.00022.19
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0040.00423.91
8.1.230.0110.00019.16
8.1.220.0080.00017.80
8.1.210.0060.00318.77
8.1.200.0060.00317.35
8.1.190.0050.00317.52
8.1.180.0090.00018.10
8.1.170.0030.00518.61
8.1.160.0000.00722.02
8.1.150.0040.00418.57
8.1.140.0070.00017.48
8.1.130.0030.00317.86
8.1.120.0070.00017.39
8.1.110.0030.00717.36
8.1.100.0000.00717.27
8.1.90.0000.00817.52
8.1.80.0000.00817.36
8.1.70.0040.00417.46
8.1.60.0040.00817.49
8.1.50.0000.00817.43
8.1.40.0030.00517.42
8.1.30.0040.00417.60
8.1.20.0030.00517.63
8.1.10.0000.00717.48
8.1.00.0050.00217.56
8.0.300.0000.00719.15
8.0.290.0040.00417.18
8.0.280.0030.00618.36
8.0.270.0040.00417.27
8.0.260.0060.00017.36
8.0.250.0050.00216.92
8.0.240.0000.00616.91
8.0.230.0000.00717.04
8.0.220.0030.00316.87
8.0.210.0000.00717.00
8.0.200.0040.00417.03
8.0.190.0000.00917.02
8.0.180.0030.00317.02
8.0.170.0030.00617.02
8.0.160.0070.00016.88
8.0.150.0030.00416.96
8.0.140.0000.00816.98
8.0.130.0000.00513.35
8.0.120.0000.00816.84
8.0.110.0040.00416.98
8.0.100.0000.00717.02
8.0.90.0000.00716.82
8.0.80.0060.00916.86
8.0.70.0070.00016.92
8.0.60.0070.00016.74
8.0.50.0040.00416.95
8.0.30.0120.00817.20
8.0.20.0120.01317.40
8.0.10.0050.00217.08
8.0.00.0100.00816.85
7.4.330.0020.00515.00
7.4.320.0030.00316.65
7.4.300.0030.00316.50
7.4.290.0030.00516.61
7.4.280.0030.00616.58
7.4.270.0000.00716.42
7.4.260.0030.00516.51
7.4.250.0070.00016.59
7.4.240.0000.00716.46
7.4.230.0000.00716.34
7.4.220.0070.01316.45
7.4.210.0050.01016.60
7.4.200.0070.00016.71
7.4.190.0040.00416.57
7.4.160.0170.00816.34
7.4.150.0180.00017.40
7.4.140.0130.00617.86
7.4.130.0080.00916.58
7.4.120.0110.00716.50
7.4.110.0090.01216.49
7.4.100.0150.00916.38
7.4.90.0140.00316.52
7.4.80.0080.01119.39
7.4.70.0030.01316.41
7.4.60.0130.01016.54
7.4.50.0060.00316.54
7.4.40.0120.00322.77
7.4.30.0100.00716.68
7.4.00.0030.01014.95
7.3.330.0000.00613.21
7.3.320.0000.00513.42
7.3.310.0070.00016.43
7.3.300.0000.00716.45
7.3.290.0070.00716.45
7.3.280.0080.00716.42
7.3.270.0140.00417.40
7.3.260.0130.00516.45
7.3.250.0130.00816.67
7.3.240.0100.01616.49
7.3.230.0110.00816.47
7.3.210.0110.01116.41
7.3.200.0060.01319.39
7.3.190.0030.02016.68
7.3.180.0110.00716.59
7.3.170.0080.00816.28
7.3.160.0100.01016.41
7.3.120.0070.01014.80
7.2.330.0130.00516.77
7.2.320.0070.01016.75
7.2.310.0100.00816.45
7.2.300.0090.00916.81
7.2.290.0120.00616.68
7.2.00.0030.01319.54
7.1.100.0090.00318.14
7.1.70.0030.00517.18
7.1.60.0140.01019.33
7.1.50.0070.01416.78
7.1.00.0000.08022.48
7.0.200.0060.00316.55
7.0.140.0030.07322.05
7.0.60.0030.08721.77
7.0.50.0030.06017.87
7.0.40.0130.06020.05
7.0.30.0200.07320.08
7.0.20.0270.03720.10
7.0.10.0200.06720.15
7.0.00.0070.04020.15
5.6.280.0070.06721.11
5.6.210.0100.07720.67
5.6.200.0070.07318.19
5.6.190.0100.03720.41
5.6.180.0230.05020.48
5.6.170.0400.06720.56
5.6.160.0100.08320.48
5.6.150.0170.07318.15
5.6.140.0000.04318.15
5.6.130.0130.07318.19
5.6.120.0130.06721.12
5.6.110.0070.05021.03
5.6.100.0030.04020.98
5.6.90.0130.07721.11
5.6.80.0070.08020.46
5.5.350.1630.05020.33
5.5.340.0030.04017.93
5.5.330.0130.05320.43
5.5.320.0770.03720.27
5.5.310.0200.08720.26
5.5.300.0070.05017.97
5.5.290.0030.08018.01
5.5.280.0100.08020.77
5.5.270.0130.07720.86
5.5.260.0100.08320.89
5.5.250.0100.07720.62
5.5.240.0070.05320.19
5.4.450.3930.03319.44
5.4.440.0100.04719.32
5.4.430.0700.06719.59
5.4.420.3470.03719.25
5.4.410.3100.03719.18
5.4.400.0070.03319.23
5.4.390.2100.03019.14
5.4.380.3130.03018.98
5.4.370.2370.03318.98
5.4.360.3870.04019.26
5.4.350.3530.03719.15
5.4.340.3500.03318.95
5.4.320.3800.04719.22
5.4.310.3830.04319.26
5.4.300.3830.03718.95
5.4.290.3870.03318.93
5.4.280.3830.04019.20
5.4.270.3430.03719.17
5.4.260.3570.04019.26
5.4.250.3600.03019.00
5.4.240.3900.03319.05
5.4.230.3830.03319.20
5.4.220.3730.04019.21
5.4.210.3500.04019.17
5.4.200.3600.03319.12
5.4.190.3730.04019.03
5.4.180.4100.04718.92
5.4.170.3670.04719.21
5.4.160.4000.04019.20
5.4.150.3930.03718.96
5.4.140.4200.04016.39
5.4.130.3800.04016.54
5.4.120.3630.04316.41
5.4.110.3900.03016.55
5.4.100.3800.03016.46
5.4.90.3870.03316.35
5.4.80.3570.03316.44
5.4.70.3930.03016.20
5.4.60.3930.03316.43
5.4.50.4100.02716.45
5.4.40.3900.03016.49
5.4.30.3970.03316.50
5.4.20.3630.04016.53
5.4.10.3900.03316.22
5.4.00.3870.03315.70
5.3.290.3970.03314.60
5.3.280.3830.03014.52
5.3.270.3730.04714.39
5.3.260.3930.03714.54
5.3.250.3870.04014.54
5.3.240.4170.04014.58
5.3.230.3670.04314.53
5.3.220.3930.03314.49
5.3.210.3670.03314.60
5.3.200.3570.03014.36
5.3.190.3830.02714.45
5.3.180.3930.03314.58
5.3.170.3900.03314.44
5.3.160.3700.04714.49
5.3.150.3700.03714.50
5.3.140.3800.04014.50
5.3.130.3630.03314.52
5.3.120.3900.03714.34
5.3.110.3870.03714.49
5.3.100.3570.03713.97
5.3.90.3870.03313.96
5.3.80.3730.03713.94
5.3.70.3830.03313.83
5.3.60.3700.03713.93
5.3.50.4170.04713.96
5.3.40.3870.04013.88
5.3.30.3570.04013.73
5.3.20.3500.03313.61
5.3.10.3900.02713.58
5.3.00.3930.03013.58
5.2.170.3800.04011.15
5.2.160.3400.03311.15
5.2.150.3200.02711.14
5.2.140.3470.03311.12
5.2.130.3470.03011.08
5.2.120.3230.02011.18
5.2.110.3370.01710.92
5.2.100.3270.02711.03
5.2.90.3170.03011.07
5.2.80.3000.02711.02
5.2.70.3470.03711.09
5.2.60.2970.03010.95
5.2.50.3500.03010.90
5.2.40.2670.02710.80
5.2.30.2570.02710.90
5.2.20.2530.02710.81
5.2.10.2470.02710.89
5.2.00.2470.03310.57
5.1.60.1800.0209.98
5.1.50.2000.02310.05
5.1.40.2400.0239.82
5.1.30.2630.03010.34
5.1.20.2300.02710.36
5.1.10.2370.02310.03
5.1.00.2800.03010.08
5.0.50.1700.0208.45
5.0.40.0000.0238.25
5.0.30.0000.0308.13
5.0.20.0000.0208.18
5.0.10.0030.0178.18
5.0.00.0000.0308.14
4.4.90.1230.0206.35
4.4.80.1570.0176.35
4.4.70.1300.0176.35
4.4.60.1200.0176.35
4.4.50.1200.0176.35
4.4.40.0700.0206.35
4.4.30.0930.0176.35
4.4.20.1370.0206.35
4.4.10.0930.0176.35
4.4.00.0830.0306.35
4.3.110.0000.0176.35
4.3.100.0000.0176.35
4.3.90.0000.0176.35
4.3.80.0000.0236.35
4.3.70.0000.0136.35
4.3.60.0600.0136.35
4.3.50.1200.0106.35
4.3.40.1100.0236.35
4.3.30.0600.0176.35
4.3.20.0630.0136.35
4.3.10.0300.0176.35
4.3.00.0570.0176.35

preferences:
38.42 ms | 400 KiB | 5 Q