3v4l.org

run code in 300+ PHP versions simultaneously
<?php $blah= array(array('a'=> array('name' => 'test'), 'b' => array('name' => 'test2', 'alias' => 'blah'))); $blank = array(); function _test(&$test, &$blank) { foreach ($test as $key => $value) { if (is_array($value) === false) continue; if (isset($value['alias']) === true) { $clonedArray = array(); $clonedArray = array_merge($clonedArray, $test); unset($clonedArray[$key]['a']); $blank[$value['alias']] = $clonedArray; } if (isset($value['isalias']) === true) { $test[$key] = $blank[$value['name']]; } if (is_array($value) === true){ _test($test[$key], $blank); } } } _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.0070.01018.34
8.3.50.0120.00822.05
8.3.40.0070.00718.67
8.3.30.0090.00618.63
8.3.20.0080.00020.39
8.3.10.0040.00420.20
8.3.00.0040.00421.64
8.2.180.0170.00316.50
8.2.170.0070.01122.96
8.2.160.0070.00722.00
8.2.150.0090.00024.18
8.2.140.0060.00324.66
8.2.130.0000.00821.24
8.2.120.0000.00826.35
8.2.110.0030.00721.10
8.2.100.0070.00717.84
8.2.90.0040.00417.84
8.2.80.0060.00318.22
8.2.70.0060.00317.62
8.2.60.0000.00918.04
8.2.50.0040.00418.09
8.2.40.0090.00020.57
8.2.30.0090.00019.58
8.2.20.0040.00417.64
8.2.10.0040.00418.10
8.2.00.0000.00818.02
8.1.280.0110.00725.92
8.1.270.0080.00021.98
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0070.00422.54
8.1.230.0060.00621.04
8.1.220.0000.00817.79
8.1.210.0000.00819.04
8.1.200.0090.00017.35
8.1.190.0060.00317.36
8.1.180.0000.00818.10
8.1.170.0040.00418.40
8.1.160.0040.00420.85
8.1.150.0050.00318.85
8.1.140.0000.00819.60
8.1.130.0040.00417.67
8.1.120.0000.00717.37
8.1.110.0040.00417.38
8.1.100.0070.00017.41
8.1.90.0000.00817.51
8.1.80.0000.00717.48
8.1.70.0000.00817.48
8.1.60.0000.00817.47
8.1.50.0040.00417.43
8.1.40.0000.00717.57
8.1.30.0030.00517.59
8.1.20.0040.00417.54
8.1.10.0000.00817.59
8.1.00.0000.00717.60
8.0.300.0040.00419.90
8.0.290.0070.00016.75
8.0.280.0000.00818.46
8.0.270.0030.00317.18
8.0.260.0000.00717.26
8.0.250.0000.00716.99
8.0.240.0000.01016.85
8.0.230.0000.00716.98
8.0.220.0100.00016.92
8.0.210.0070.00016.89
8.0.200.0000.00716.97
8.0.190.0000.00817.01
8.0.180.0000.00716.97
8.0.170.0050.00216.93
8.0.160.0050.00216.90
8.0.150.0000.00716.89
8.0.140.0050.00216.90
8.0.130.0000.00613.28
8.0.120.0030.00516.79
8.0.110.0000.00716.75
8.0.100.0040.00417.00
8.0.90.0000.00816.71
8.0.80.0090.01216.87
8.0.70.0040.00416.88
8.0.60.0040.00416.90
8.0.50.0000.00716.70
8.0.30.0130.00717.08
8.0.20.0130.00917.40
8.0.10.0040.00416.84
8.0.00.0080.01016.77
7.4.330.0000.00516.73
7.4.320.0040.00416.52
7.4.300.0000.00616.65
7.4.290.0070.00016.50
7.4.280.0040.00416.63
7.4.270.0000.00716.47
7.4.260.0040.00416.52
7.4.250.0050.00316.52
7.4.240.0040.00416.68
7.4.230.0030.00316.52
7.4.220.0140.01416.58
7.4.210.0070.00716.67
7.4.200.0040.00316.73
7.4.160.0120.00416.69
7.4.150.0080.01217.40
7.4.140.0140.01017.86
7.4.130.0120.01216.43
7.4.120.0100.00916.42
7.4.110.0140.00316.56
7.4.100.0040.01416.51
7.4.90.0090.00916.63
7.4.80.0060.01219.39
7.4.70.0120.00316.50
7.4.60.0160.00316.34
7.4.50.0100.00716.41
7.4.40.0170.00016.59
7.4.30.0100.00616.32
7.4.00.0090.00914.96
7.3.330.0030.00213.26
7.3.320.0070.00013.26
7.3.310.0000.00716.21
7.3.300.0030.00316.36
7.3.290.0100.00616.34
7.3.280.0100.00616.40
7.3.270.0070.01717.40
7.3.260.0090.00916.74
7.3.250.0100.00816.52
7.3.240.0140.00716.52
7.3.230.0130.00916.57
7.3.210.0120.00616.41
7.3.200.0080.01316.73
7.3.190.0080.00816.39
7.3.180.0150.00316.57
7.3.170.0170.00916.40
7.3.160.0080.00816.72
7.3.10.0070.00716.46
7.3.00.0040.01116.49
7.2.330.0040.01416.81
7.2.320.0070.01016.47
7.2.310.0090.01016.81
7.2.300.0170.00316.71
7.2.290.0110.00516.70
7.2.130.0030.00616.97
7.2.120.0030.01316.82
7.2.110.0060.00616.92
7.2.100.0060.00616.93
7.2.90.0100.00317.11
7.2.80.0060.00616.79
7.2.70.0060.00316.92
7.2.60.0050.01016.94
7.2.50.0060.00916.89
7.2.40.0060.00916.70
7.2.30.0030.00716.70
7.2.20.0090.00917.08
7.2.10.0040.00716.96
7.2.00.0050.00818.12
7.1.250.0090.00015.90
7.1.200.0080.00415.94
7.1.100.0100.01017.88
7.1.70.0040.00717.28
7.1.60.0070.01819.24
7.1.50.0000.01916.97
7.1.00.0030.07322.46
7.0.200.0700.00314.79
7.0.60.0400.06019.95
7.0.50.0100.03317.83
7.0.40.0200.06319.96
7.0.30.0400.04320.08
7.0.20.0230.03320.09
7.0.10.0030.07320.12
7.0.00.0070.09020.16
5.6.280.0100.06020.81
5.6.210.0130.07320.67
5.6.200.0030.04018.19
5.6.190.0170.03320.48
5.6.180.0170.04320.68
5.6.170.1530.05320.46
5.6.160.0030.05320.50
5.6.150.0070.07718.19
5.6.140.0130.07318.18
5.6.130.0130.08018.12
5.6.120.0030.05320.90
5.6.110.0130.07020.96
5.6.100.0170.05720.98
5.6.90.0100.07021.00
5.6.80.0230.07020.49
5.5.350.0370.06320.52
5.5.340.0070.07317.94
5.5.330.0070.05720.37
5.5.320.0200.03720.35
5.5.310.0230.07720.19
5.5.300.0070.08318.00
5.5.290.0070.05718.08
5.5.280.0070.08020.88
5.5.270.0200.05720.87
5.5.260.0070.06020.75
5.5.250.0130.08320.58
5.5.240.0100.07320.04

preferences:
61.03 ms | 401 KiB | 5 Q