3v4l.org

run code in 300+ PHP versions simultaneously
<?php $blah= array(array('a'=> 1, 'b' => array('inner' => 2))); function _test(&$test) { foreach ($test as $key => $value) { if (is_array($value) === false) continue; $clone = array(); $clone = array_merge($clone, $test); unset($clone[$key]['a']); 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.60.0070.01418.18
8.3.50.0100.00822.04
8.3.40.0110.00418.84
8.3.30.0070.00718.49
8.3.20.0030.00620.38
8.3.10.0030.00620.36
8.3.00.0080.00021.76
8.2.180.0110.00716.38
8.2.170.0100.00722.96
8.2.160.0030.01022.11
8.2.150.0040.00424.18
8.2.140.0090.00024.66
8.2.130.0080.00020.94
8.2.120.0000.00826.35
8.2.110.0030.00621.88
8.2.100.0080.00318.05
8.2.90.0030.00619.37
8.2.80.0030.00617.97
8.2.70.0040.00417.59
8.2.60.0080.00017.93
8.2.50.0040.00418.09
8.2.40.0040.00420.52
8.2.30.0000.01019.50
8.2.20.0000.00817.75
8.2.10.0020.00518.02
8.2.00.0040.00418.00
8.1.280.0100.01025.92
8.1.270.0030.00522.05
8.1.260.0000.00828.09
8.1.250.0040.00428.09
8.1.240.0030.00622.48
8.1.230.0070.00317.89
8.1.220.0060.00317.74
8.1.210.0080.00018.77
8.1.200.0060.00317.35
8.1.190.0050.00316.98
8.1.180.0060.00318.10
8.1.170.0030.00718.50
8.1.160.0040.00420.81
8.1.150.0080.00018.89
8.1.140.0040.00419.57
8.1.130.0040.00417.71
8.1.120.0050.00217.38
8.1.110.0000.00817.46
8.1.100.0050.00317.40
8.1.90.0070.00017.38
8.1.80.0000.00717.46
8.1.70.0030.00317.51
8.1.60.0040.00417.62
8.1.50.0000.00917.42
8.1.40.0000.00817.51
8.1.30.0030.00617.50
8.1.20.0060.00317.52
8.1.10.0040.00417.57
8.1.00.0000.00817.38
8.0.300.0000.00718.77
8.0.290.0050.00316.63
8.0.280.0030.00318.46
8.0.270.0080.00017.25
8.0.260.0030.00317.21
8.0.250.0000.00716.96
8.0.240.0030.00716.87
8.0.230.0040.00416.80
8.0.220.0060.00316.79
8.0.210.0000.00716.82
8.0.200.0030.00316.88
8.0.190.0000.00816.95
8.0.180.0040.00416.84
8.0.170.0050.00316.81
8.0.160.0040.00416.95
8.0.150.0070.00016.71
8.0.140.0030.00316.83
8.0.130.0030.00313.36
8.0.120.0040.00416.82
8.0.110.0040.00416.89
8.0.100.0070.00016.76
8.0.90.0080.00016.91
8.0.80.0040.01116.80
8.0.70.0040.00416.82
8.0.60.0080.00016.78
8.0.50.0040.00416.91
8.0.30.0090.00817.14
8.0.20.0150.00417.40
8.0.10.0040.00416.90
8.0.00.0090.00816.66
7.4.330.0050.00016.71
7.4.320.0030.00316.55
7.4.300.0000.00616.44
7.4.290.0050.00316.60
7.4.280.0090.00016.50
7.4.270.0080.00316.66
7.4.260.0000.00816.51
7.4.250.0000.00716.54
7.4.240.0060.00316.59
7.4.230.0000.00716.30
7.4.220.0110.01516.71
7.4.210.0090.00616.50
7.4.200.0000.00716.52
7.4.160.0000.01516.61
7.4.150.0070.01217.40
7.4.140.0170.01117.86
7.4.130.0120.00616.45
7.4.120.0080.01016.60
7.4.110.0070.01716.53
7.4.100.0040.01216.52
7.4.90.0090.01216.67
7.4.80.0100.00619.39
7.4.70.0120.00816.51
7.4.60.0030.01416.50
7.4.50.0140.00316.57
7.4.40.0120.00616.49
7.4.30.0080.00916.64
7.4.00.0070.00715.00
7.3.330.0050.00013.33
7.3.320.0050.00013.20
7.3.310.0050.00216.24
7.3.300.0030.00316.39
7.3.290.0050.01316.32
7.3.280.0140.00616.33
7.3.270.0060.01117.40
7.3.260.0070.01016.35
7.3.250.0090.00816.42
7.3.240.0140.00216.46
7.3.230.0070.01016.47
7.3.210.0030.01316.59
7.3.200.0120.00416.36
7.3.190.0130.01016.67
7.3.180.0040.01216.43
7.3.170.0100.01316.64
7.3.160.0060.00916.70
7.3.120.0080.01015.07
7.3.110.0050.01414.95
7.3.100.0050.01014.78
7.3.90.0050.00914.82
7.3.80.0060.00814.72
7.3.70.0070.00814.74
7.3.60.0080.00614.79
7.3.50.0050.01014.69
7.3.40.0070.00814.70
7.3.30.0050.00914.96
7.3.20.0050.01016.70
7.3.10.0080.00616.64
7.3.00.0060.00616.63
7.2.330.0120.00616.45
7.2.320.0080.00816.70
7.2.310.0140.01116.64
7.2.300.0140.00716.66
7.2.290.0130.00316.78
7.2.250.0070.01115.19
7.2.240.0080.01215.05
7.2.230.0030.01115.04
7.2.220.0070.00814.83
7.2.210.0060.01015.00
7.2.200.0070.00514.91
7.2.190.0040.01215.17
7.2.180.0080.00815.10
7.2.170.0100.00715.02
7.2.00.0090.00619.33
7.1.330.0080.00515.67
7.1.320.0070.00515.78
7.1.310.0010.01215.88
7.1.300.0040.01115.81
7.1.290.0020.00915.95
7.1.280.0050.01015.73
7.1.270.0050.00715.93
7.1.260.0130.00115.90
7.1.100.0030.01018.23
7.1.70.0030.00616.99
7.1.60.0090.01619.24
7.1.50.0040.01816.89
7.1.00.0070.07322.35
7.0.200.0690.00314.65
7.0.60.0370.07319.87
7.0.50.0100.03317.88
7.0.40.0030.09020.24
7.0.30.0270.08320.20
7.0.20.0170.04320.20
7.0.10.0130.07720.24
7.0.00.0000.06720.10
5.6.210.0070.08320.63
5.6.200.0070.07718.16
5.6.190.0030.04320.63
5.6.180.0170.04720.52
5.6.170.1430.04320.44
5.6.160.0070.08720.55
5.6.150.0100.03318.23
5.6.140.0130.07018.14
5.6.130.0070.05718.15
5.6.120.0070.04021.13
5.6.110.0130.07321.05
5.6.100.0070.04320.98
5.6.90.0070.05721.09
5.6.80.0170.07020.51
5.5.350.0300.08020.41
5.5.340.0070.08017.95
5.5.330.0100.04320.40
5.5.320.0130.05020.32
5.5.310.0270.08720.40
5.5.300.0070.04017.93
5.5.290.0000.04317.96
5.5.280.0030.08720.85
5.5.270.0130.06320.87
5.5.260.0030.09020.64
5.5.250.0000.06720.61
5.5.240.0030.06720.26

preferences:
51.71 ms | 401 KiB | 5 Q