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); 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.70.0070.01516.58
8.3.60.0030.01218.40
8.3.50.0150.00421.92
8.3.40.0110.00418.97
8.3.30.0060.00918.67
8.3.20.0040.00420.16
8.3.10.0060.00320.64
8.3.00.0030.00621.89
8.2.180.0070.00716.38
8.2.170.0100.00622.96
8.2.160.0070.00722.07
8.2.150.0040.00424.18
8.2.140.0030.00624.66
8.2.130.0030.00520.97
8.2.120.0030.00626.35
8.2.110.0100.00022.02
8.2.100.0080.00417.80
8.2.90.0040.00419.13
8.2.80.0040.00417.97
8.2.70.0040.00417.63
8.2.60.0050.00317.93
8.2.50.0050.00318.09
8.2.40.0030.00620.41
8.2.30.0040.00419.25
8.2.20.0000.00717.73
8.2.10.0030.00318.05
8.2.00.0040.00417.93
8.1.280.0100.01025.92
8.1.270.0090.00621.98
8.1.260.0050.00328.09
8.1.250.0040.00428.09
8.1.240.0000.00922.61
8.1.230.0030.00717.89
8.1.220.0000.00717.79
8.1.210.0000.00818.77
8.1.200.0060.00317.22
8.1.190.0000.00817.23
8.1.180.0080.00018.10
8.1.170.0080.00318.59
8.1.160.0000.00720.65
8.1.150.0070.00018.90
8.1.140.0050.00319.51
8.1.130.0070.00017.65
8.1.120.0040.00417.47
8.1.110.0000.00717.36
8.1.100.0050.00317.28
8.1.90.0040.00417.43
8.1.80.0000.00817.38
8.1.70.0030.00317.29
8.1.60.0000.00717.57
8.1.50.0060.00317.53
8.1.40.0040.00417.54
8.1.30.0080.00017.56
8.1.20.0000.00717.44
8.1.10.0040.00417.57
8.1.00.0040.00417.55
8.0.300.0030.00518.77
8.0.290.0040.00416.63
8.0.280.0000.00718.31
8.0.270.0030.00317.13
8.0.260.0050.00317.06
8.0.250.0060.00017.02
8.0.240.0030.00716.93
8.0.230.0030.00316.81
8.0.220.0000.00916.86
8.0.210.0030.00316.79
8.0.200.0000.00716.95
8.0.190.0000.00716.93
8.0.180.0000.00816.85
8.0.170.0000.00716.90
8.0.160.0030.00416.94
8.0.150.0040.00416.96
8.0.140.0040.00416.90
8.0.130.0030.00313.36
8.0.120.0050.00316.86
8.0.110.0040.00416.93
8.0.100.0000.00716.87
8.0.90.0040.00416.86
8.0.80.0030.01216.88
8.0.70.0070.00016.92
8.0.60.0070.00016.71
8.0.50.0000.00816.78
8.0.30.0120.00717.02
8.0.20.0100.01017.41
8.0.10.0040.00416.88
8.0.00.0090.00916.70
7.4.330.0000.00516.74
7.4.320.0030.00316.57
7.4.300.0030.00316.46
7.4.290.0000.00716.53
7.4.280.0000.00816.64
7.4.270.0000.00816.46
7.4.260.0030.00516.59
7.4.250.0070.00016.36
7.4.240.0030.00316.51
7.4.230.0080.00016.60
7.4.220.0090.00916.38
7.4.210.0060.01216.61
7.4.200.0040.00416.64
7.4.160.0070.00716.38
7.4.150.0070.01117.40
7.4.140.0140.02217.86
7.4.130.0100.00816.55
7.4.120.0120.00716.52
7.4.110.0060.01016.49
7.4.100.0120.00916.46
7.4.90.0100.01016.53
7.4.80.0060.01219.39
7.4.70.0110.00916.58
7.4.60.0080.00816.42
7.4.50.0030.00916.46
7.4.40.0100.00616.40
7.4.30.0120.00916.55
7.4.00.0130.00315.09
7.3.330.0000.00513.29
7.3.320.0030.00313.39
7.3.310.0040.00416.19
7.3.300.0000.00716.36
7.3.290.0080.01016.34
7.3.280.0070.00616.26
7.3.270.0070.01017.40
7.3.260.0090.00916.42
7.3.250.0120.00716.47
7.3.240.0120.00616.37
7.3.230.0070.01116.47
7.3.210.0100.00716.28
7.3.200.0130.00316.32
7.3.190.0100.00716.43
7.3.180.0040.01216.52
7.3.170.0170.00616.64
7.3.160.0060.00916.59
7.2.330.0040.01716.40
7.2.320.0090.00916.26
7.2.310.0080.01116.67
7.2.300.0030.01616.40
7.2.290.0000.01616.53
7.2.60.0030.01316.71
7.2.00.0000.01319.13
7.1.200.0040.00715.60
7.1.100.0060.01318.11
7.1.70.0030.00616.82
7.1.60.0170.00719.24
7.1.50.0060.00916.93
7.1.00.0100.07022.51
7.0.200.0440.00714.63
7.0.60.0370.06320.04
7.0.50.0030.04017.86
7.0.40.0070.05320.32
7.0.30.0130.04320.26
7.0.20.0100.04720.22
7.0.10.0100.07320.12
7.0.00.0070.08020.20
5.6.280.0070.05020.86
5.6.210.0070.08020.63
5.6.200.0070.04318.28
5.6.190.0030.05020.57
5.6.180.0300.03020.33
5.6.170.0270.05320.57
5.6.160.0070.04320.54
5.6.150.0070.08018.18
5.6.140.0130.06018.15
5.6.130.0130.08018.17
5.6.120.0200.07321.05
5.6.110.0130.08021.08
5.6.100.0070.07321.02
5.6.90.0170.07320.98
5.6.80.0170.07020.51
5.5.350.0270.07720.34
5.5.340.0030.05317.99
5.5.330.0030.05320.19
5.5.320.0330.07320.42
5.5.310.0330.04320.32
5.5.300.0030.08317.98
5.5.290.0030.05318.09
5.5.280.0100.04020.88
5.5.270.0100.08020.97
5.5.260.0070.05320.66
5.5.250.0070.06720.47
5.5.240.0070.07720.37

preferences:
62.21 ms | 401 KiB | 5 Q