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[$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.60.0070.00716.36
8.3.50.0100.01021.95
8.3.40.0120.00618.67
8.3.30.0140.00019.02
8.3.20.0080.00020.27
8.3.10.0000.00823.45
8.3.00.0050.00319.38
8.2.180.0080.00818.38
8.2.170.0000.01522.96
8.2.160.0070.00720.53
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0070.00022.06
8.2.110.0060.00322.12
8.2.100.0040.00817.84
8.2.90.0000.00819.17
8.2.80.0040.00418.05
8.2.70.0060.00317.63
8.2.60.0040.00417.93
8.2.50.0060.00319.22
8.2.40.0040.00418.16
8.2.30.0060.00318.22
8.2.20.0070.00017.80
8.2.10.0000.00818.16
8.2.00.0030.00617.65
8.1.280.0160.00025.92
8.1.270.0060.00323.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00323.82
8.1.230.0040.00719.16
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0060.00317.38
8.1.190.0050.00317.40
8.1.180.0030.00618.10
8.1.170.0060.00318.67
8.1.160.0090.00022.04
8.1.150.0050.00218.66
8.1.140.0070.00017.48
8.1.130.0000.00817.84
8.1.120.0030.00317.53
8.1.110.0040.00717.53
8.1.100.0020.00517.41
8.1.90.0030.00517.37
8.1.80.0030.00517.51
8.1.70.0030.00317.39
8.1.60.0060.00317.49
8.1.50.0000.00917.52
8.1.40.0040.00417.50
8.1.30.0060.00317.63
8.1.20.0040.00417.63
8.1.10.0030.00517.47
8.1.00.0000.00817.46
8.0.300.0040.00419.09
8.0.290.0040.00416.93
8.0.280.0060.00318.39
8.0.270.0040.00417.18
8.0.260.0030.00317.28
8.0.250.0000.00716.99
8.0.240.0040.00416.97
8.0.230.0000.00716.85
8.0.220.0050.00216.79
8.0.210.0070.00016.76
8.0.200.0070.00016.93
8.0.190.0030.00616.80
8.0.180.0040.00416.94
8.0.170.0040.00416.84
8.0.160.0040.00416.77
8.0.150.0080.00016.80
8.0.140.0050.00316.80
8.0.130.0030.00313.39
8.0.120.0070.00016.87
8.0.110.0040.00416.79
8.0.100.0070.00016.72
8.0.90.0040.00416.72
8.0.80.0060.00916.96
8.0.70.0080.00016.73
8.0.60.0000.00816.96
8.0.50.0000.00816.90
8.0.30.0130.01117.28
8.0.20.0100.01017.40
8.0.10.0040.00416.97
8.0.00.0150.00416.72
7.4.330.0030.00315.00
7.4.320.0070.00016.48
7.4.300.0060.00016.54
7.4.290.0000.00716.61
7.4.280.0040.00416.64
7.4.270.0040.00416.61
7.4.260.0000.00816.59
7.4.250.0000.00716.55
7.4.240.0050.00316.49
7.4.230.0070.00016.63
7.4.220.0150.00616.62
7.4.210.0050.01016.62
7.4.200.0030.00316.41
7.4.190.0000.00716.50
7.4.160.0110.00516.47
7.4.150.0130.00717.40
7.4.140.0050.01417.86
7.4.130.0070.01016.55
7.4.120.0110.00816.36
7.4.110.0070.01116.55
7.4.100.0130.00616.63
7.4.90.0070.01016.55
7.4.80.0110.00819.39
7.4.70.0160.00016.45
7.4.60.0120.00616.63
7.4.50.0000.00816.34
7.4.40.0040.01422.77
7.4.30.0030.01316.40
7.4.00.0040.01415.17
7.3.330.0030.00313.19
7.3.320.0030.00313.33
7.3.310.0070.00016.43
7.3.300.0000.00716.32
7.3.290.0090.00616.31
7.3.280.0060.01216.34
7.3.270.0090.00917.40
7.3.260.0060.01116.53
7.3.250.0080.01216.46
7.3.240.0100.01316.36
7.3.230.0030.01416.39
7.3.210.0120.00616.45
7.3.200.0050.01919.39
7.3.190.0130.00616.55
7.3.180.0070.01116.56
7.3.170.0080.00816.52
7.3.160.0130.01016.42
7.3.120.0070.00715.16
7.3.10.0050.00716.57
7.3.00.0050.00516.86
7.2.330.0090.00916.67
7.2.320.0070.01116.42
7.2.310.0100.00716.40
7.2.300.0040.01316.57
7.2.290.0080.00816.43
7.2.130.0050.00516.81
7.2.120.0030.01016.85
7.2.110.0040.00816.93
7.2.100.0070.00516.96
7.2.90.0070.00716.85
7.2.80.0100.00316.73
7.2.70.0070.00616.73
7.2.60.0020.01216.93
7.2.50.0050.00816.86
7.2.40.0020.01316.85
7.2.30.0050.00716.93
7.2.20.0050.00716.83
7.2.10.0030.01016.95
7.2.00.0060.00816.96
7.1.250.0080.00415.91
7.1.200.0000.00615.72
7.1.70.0030.00517.08
7.1.60.0030.02019.33
7.1.50.0100.00716.95
7.1.00.0030.07722.31
7.0.200.0060.00616.79
7.0.140.0070.07022.15
7.0.60.0100.07319.79
7.0.50.0100.07717.87
7.0.40.0200.08020.27
7.0.30.0370.07320.16
7.0.20.0230.04720.19
7.0.10.0100.05020.16
7.0.00.0170.08020.11
5.6.280.0030.07320.90
5.6.210.0070.04020.63
5.6.200.0030.04018.13
5.6.190.0130.08320.57
5.6.180.0130.04020.48
5.6.170.0300.07320.50
5.6.160.0030.06020.48
5.6.150.0070.08318.24
5.6.140.0070.04018.17
5.6.130.0030.04018.29
5.6.120.0130.08021.00
5.6.110.0030.04720.98
5.6.100.0070.08321.13
5.6.90.0170.07320.97
5.6.80.0130.07320.36
5.5.350.0100.05020.32
5.5.340.0130.07717.95
5.5.330.0030.04320.61
5.5.320.0300.06720.27
5.5.310.0330.04320.37
5.5.300.0170.05018.08
5.5.290.0170.06317.92
5.5.280.0100.08320.77
5.5.270.0170.07020.89
5.5.260.0170.08020.82
5.5.250.0000.08020.66
5.5.240.0030.07720.18
5.4.450.0200.06319.57
5.4.440.0170.04719.21
5.4.430.0200.05019.45
5.4.420.0130.04019.31
5.4.410.0100.04319.18
5.4.400.0300.06319.07
5.4.390.0230.06719.22
5.4.380.0170.05018.97
5.4.370.0170.04719.23
5.4.360.0230.07319.00
5.4.350.0270.05019.24
5.4.340.0300.04019.10
5.4.320.0230.05318.98
5.4.310.0200.07019.18
5.4.300.0170.03718.87
5.4.290.0130.04018.83
5.4.280.0170.03719.19
5.4.270.0100.04319.21
5.4.260.0130.04019.16
5.4.250.0200.03318.98
5.4.240.0230.07319.23
5.4.230.0230.05018.94
5.4.220.0200.07018.88
5.4.210.0070.04718.83
5.4.200.0270.07018.95
5.4.190.0200.06018.83
5.4.180.0330.06719.30
5.4.170.0170.03719.05
5.4.160.0300.03719.07
5.4.150.0270.07019.17
5.4.140.0230.07316.28
5.4.130.0230.06316.48
5.4.120.0270.06016.50
5.4.110.0130.05716.54
5.4.100.0170.07316.59
5.4.90.0230.07016.54
5.4.80.0230.05316.49
5.4.70.0170.07016.44
5.4.60.0200.04316.53
5.4.50.0200.06016.47
5.4.40.0270.06316.55
5.4.30.0170.04316.48
5.4.20.0170.06016.34
5.4.10.0170.07716.33
5.4.00.0270.06015.93
5.3.290.0230.05714.52
5.3.280.0200.05314.43
5.3.270.0130.04314.43
5.3.260.0330.05314.45
5.3.250.0100.04314.59
5.3.240.0100.05714.62
5.3.230.0370.06014.55
5.3.220.0200.06314.44
5.3.210.0170.05014.52
5.3.200.0200.04014.41
5.3.190.0200.07714.54
5.3.180.0200.04314.45
5.3.170.0300.05714.39
5.3.160.0200.03714.52
5.3.150.0170.06714.44
5.3.140.0200.04014.65
5.3.130.0100.04314.40
5.3.120.0130.04014.38
5.3.110.0330.04314.59
5.3.100.0170.04013.88
5.3.90.0170.03313.87
5.3.80.0170.03314.03
5.3.70.0130.03713.96
5.3.60.0070.06013.96
5.3.50.0270.06313.96
5.3.40.0130.05713.79
5.3.30.0200.04013.89
5.3.20.0170.06013.57
5.3.10.0230.04713.61
5.3.00.0270.07013.51
5.2.170.0200.05010.99
5.2.160.0100.04011.05
5.2.150.0170.02711.22
5.2.140.0100.03011.30
5.2.130.0130.03310.99
5.2.120.0070.03010.93
5.2.110.0230.03311.01
5.2.100.0230.03010.94
5.2.90.0170.02711.11
5.2.80.0130.04011.11
5.2.70.0070.03310.93
5.2.60.0170.03010.88
5.2.50.0170.02310.86
5.2.40.0100.02710.93
5.2.30.0170.04710.91
5.2.20.0130.04710.87
5.2.10.0170.05310.90
5.2.00.0130.02310.65
5.1.60.0100.0239.98
5.1.50.0130.0279.96
5.1.40.0100.03010.10
5.1.30.0170.03310.29
5.1.20.0070.03010.46
5.1.10.0130.02710.04
5.1.00.0200.04310.12
5.0.50.0070.0438.57
5.0.40.0030.0278.49
5.0.30.0030.0308.15
5.0.20.0000.0238.17
5.0.10.0030.0408.15
5.0.00.0070.0278.15
4.4.90.0130.0138.15
4.4.80.0030.0208.15
4.4.70.0030.0178.15
4.4.60.0070.0138.15
4.4.50.0070.0138.15
4.4.40.0030.0238.15
4.4.30.0030.0178.15
4.4.20.0030.0178.15
4.4.10.0030.0178.15
4.4.00.0070.0238.15
4.3.110.0070.0138.15
4.3.100.0030.0238.15
4.3.90.0100.0178.15
4.3.80.0030.0278.15
4.3.70.0030.0178.15
4.3.60.0100.0108.15
4.3.50.0070.0138.15
4.3.40.0100.0208.15
4.3.30.0000.0208.15
4.3.20.0030.0138.15
4.3.10.0000.0138.15
4.3.00.0000.0138.15

preferences:
62.41 ms | 401 KiB | 5 Q