3v4l.org

run code in 300+ PHP versions simultaneously
<?php $blah= array(array('a'=> 1, 'b' => array('inner' => 2))); $blank = array(); function _test(&$test, &$blank) { foreach ($test as $key => $value) { if (is_array($value) === false) continue; $clonedArray = array(); $clonedArray = array_merge($clonedArray, $test); unset($clonedArray[$key]['a']); $blank[$key] = $clonedArray; if (is_array($value) === true){ _test($test[$key]); } } } _test($blah, $blank); var_dump($blah);

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.0100.01018.30
8.3.50.0060.01222.05
8.3.40.0120.00318.79
8.3.30.0110.00418.76
8.3.20.0000.00820.34
8.3.10.0040.00420.61
8.3.00.0040.00421.86
8.2.180.0120.00316.63
8.2.170.0060.01222.96
8.2.160.0130.00022.26
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0070.00021.11
8.2.120.0080.00026.35
8.2.110.0030.00620.96
8.2.100.0060.00617.84
8.2.90.0040.00417.97
8.2.80.0000.00918.22
8.2.70.0000.00917.75
8.2.60.0000.00817.93
8.2.50.0080.00018.09
8.2.40.0000.01020.56
8.2.30.0030.00619.48
8.2.20.0040.00417.84
8.2.10.0060.00318.04
8.2.00.0000.00717.98
8.1.280.0070.00725.92
8.1.270.0160.00322.19
8.1.260.0040.00428.09
8.1.250.0060.00328.09
8.1.240.0070.01022.53
8.1.230.0110.00021.03
8.1.220.0090.00017.79
8.1.210.0000.00818.91
8.1.200.0040.00417.48
8.1.190.0080.00017.23
8.1.180.0000.00818.10
8.1.170.0070.00318.59
8.1.160.0050.00320.80
8.1.150.0000.00718.89
8.1.140.0040.00419.43
8.1.130.0000.00817.76
8.1.120.0000.00817.36
8.1.110.0000.00717.42
8.1.100.0000.00717.34
8.1.90.0000.00817.36
8.1.80.0030.00617.52
8.1.70.0030.00317.39
8.1.60.0000.00717.49
8.1.50.0030.00617.48
8.1.40.0060.00317.40
8.1.30.0040.00417.55
8.1.20.0000.00717.44
8.1.10.0000.00817.48
8.1.00.0030.00617.60
8.0.300.0040.00420.03
8.0.290.0060.00316.75
8.0.280.0000.00718.34
8.0.270.0000.00717.27
8.0.260.0030.00317.25
8.0.250.0000.00717.00
8.0.240.0040.00717.01
8.0.230.0000.00716.95
8.0.220.0070.00416.95
8.0.210.0030.00316.86
8.0.200.0000.00716.88
8.0.190.0040.00416.93
8.0.180.0000.00816.98
8.0.170.0000.00816.86
8.0.160.0000.00717.09
8.0.150.0000.00716.90
8.0.140.0070.00016.98
8.0.130.0000.00513.34
8.0.120.0060.00316.91
8.0.110.0080.00016.93
8.0.100.0040.00417.00
8.0.90.0000.00717.00
8.0.80.0060.00916.91
8.0.70.0070.00016.98
8.0.60.0050.00216.85
8.0.50.0020.00516.91
8.0.30.0090.01017.03
8.0.20.0120.01117.40
8.0.10.0050.00217.11
8.0.00.0060.01416.80
7.4.330.0000.00516.70
7.4.320.0030.00316.50
7.4.300.0030.00316.45
7.4.290.0030.00316.53
7.4.280.0030.00616.50
7.4.270.0030.00716.36
7.4.260.0000.01016.63
7.4.250.0000.00716.57
7.4.240.0030.00316.59
7.4.230.0030.00316.69
7.4.220.0090.00916.43
7.4.210.0060.00916.54
7.4.200.0050.00316.32
7.4.160.0060.00916.39
7.4.150.0120.00717.40
7.4.140.0120.00817.86
7.4.130.0110.00816.49
7.4.120.0080.00916.55
7.4.110.0090.00916.60
7.4.100.0090.00916.70
7.4.90.0090.00916.48
7.4.80.0120.01219.39
7.4.70.0180.00316.56
7.4.60.0070.01016.39
7.4.50.0090.00316.37
7.4.40.0130.00316.50
7.4.30.0080.00816.68
7.4.00.0130.00315.07
7.3.330.0020.00213.41
7.3.320.0030.00313.37
7.3.310.0060.00316.51
7.3.300.0000.00716.44
7.3.290.0060.01116.40
7.3.280.0120.00716.44
7.3.270.0060.01217.40
7.3.260.0120.00616.58
7.3.250.0100.00816.54
7.3.240.0090.00716.55
7.3.230.0100.00616.43
7.3.210.0060.01216.59
7.3.200.0140.00716.43
7.3.190.0070.01416.58
7.3.180.0090.00616.50
7.3.170.0200.00316.46
7.3.160.0120.00916.50
7.3.10.0040.00716.93
7.3.00.0070.00716.88
7.2.330.0090.01116.82
7.2.320.0110.00616.46
7.2.310.0170.00716.82
7.2.300.0040.01616.95
7.2.290.0040.01216.61
7.2.130.0030.01016.99
7.2.120.0060.00616.96
7.2.110.0060.00917.05
7.2.100.0130.00317.06
7.2.90.0070.00716.80
7.2.80.0060.00616.71
7.2.70.0040.00817.02
7.2.60.0040.00917.07
7.2.50.0130.00517.04
7.2.40.0060.01116.89
7.2.30.0120.00916.77
7.2.20.0120.00316.94
7.2.10.0110.00717.08
7.2.00.0080.00718.21
7.1.250.0040.00415.57
7.1.200.0060.00315.86
7.1.100.0070.01018.07
7.1.70.0040.00417.29
7.1.60.0170.00719.24
7.1.50.0060.01617.09
7.1.00.0000.08022.44
7.0.200.0680.00414.73
7.0.60.0230.03020.09
7.0.50.0030.07717.88
7.0.40.0100.08020.29
7.0.30.0170.04020.34
7.0.20.0230.04320.26
7.0.10.0070.08720.32
7.0.00.0030.06020.06
5.6.280.0030.05021.11
5.6.210.0100.03320.65
5.6.200.0070.04718.20
5.6.190.0100.03720.64
5.6.180.0370.03020.63
5.6.170.0300.07720.47
5.6.160.0030.04320.50
5.6.150.0100.08018.19
5.6.140.0070.08318.21
5.6.130.0070.08018.21
5.6.120.0200.06720.98
5.6.110.0070.08720.98
5.6.100.0100.08021.11
5.6.90.0130.05720.96
5.6.80.0100.03720.41
5.5.350.0300.08020.41
5.5.340.0070.08017.97
5.5.330.0030.04720.21
5.5.320.0270.08320.24
5.5.310.0330.06720.34
5.5.300.0130.07717.95
5.5.290.0030.05317.98
5.5.280.0100.05020.95
5.5.270.0070.07320.64
5.5.260.0000.04720.64
5.5.250.0100.08720.77
5.5.240.0100.07720.13

preferences:
58.88 ms | 401 KiB | 5 Q