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]['alias']); $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.0110.00418.30
8.3.50.0140.00322.05
8.3.40.0070.00718.68
8.3.30.0110.00318.54
8.3.20.0040.00420.25
8.3.10.0090.00020.54
8.3.00.0040.00423.61
8.2.180.0030.01318.41
8.2.170.0180.00022.96
8.2.160.0030.01021.97
8.2.150.0050.00324.18
8.2.140.0060.00324.66
8.2.130.0070.00021.12
8.2.120.0040.00426.35
8.2.110.0090.00022.29
8.2.100.0090.00317.72
8.2.90.0090.00017.88
8.2.80.0060.00318.05
8.2.70.0040.00418.03
8.2.60.0030.00518.03
8.2.50.0040.00418.10
8.2.40.0050.00320.54
8.2.30.0060.00319.52
8.2.20.0050.00217.67
8.2.10.0000.00918.21
8.2.00.0040.00418.20
8.1.280.0100.01025.92
8.1.270.0060.00322.20
8.1.260.0040.00428.09
8.1.250.0090.00928.09
8.1.240.0040.00422.20
8.1.230.0070.00419.10
8.1.220.0060.00317.74
8.1.210.0000.00818.77
8.1.200.0080.00017.35
8.1.190.0040.00417.13
8.1.180.0080.00018.10
8.1.170.0040.00418.62
8.1.160.0000.00720.83
8.1.150.0050.00318.98
8.1.140.0050.00319.61
8.1.130.0000.00717.68
8.1.120.0040.00417.39
8.1.110.0040.00417.48
8.1.100.0020.00517.41
8.1.90.0000.00717.52
8.1.80.0000.00817.52
8.1.70.0000.00817.45
8.1.60.0000.00817.53
8.1.50.0030.00517.56
8.1.40.0000.00817.49
8.1.30.0030.00517.51
8.1.20.0000.00717.42
8.1.10.0000.00817.66
8.1.00.0030.00517.53
8.0.300.0000.00719.57
8.0.290.0090.00016.75
8.0.280.0000.00718.38
8.0.270.0000.00717.34
8.0.260.0040.00417.14
8.0.250.0000.00716.96
8.0.240.0000.01116.96
8.0.230.0060.00317.00
8.0.220.0040.00716.91
8.0.210.0040.00416.88
8.0.200.0000.00816.94
8.0.190.0020.00516.96
8.0.180.0000.00716.99
8.0.170.0000.00716.78
8.0.160.0000.00716.88
8.0.150.0000.00716.88
8.0.140.0030.00516.91
8.0.130.0060.00013.33
8.0.120.0040.00416.90
8.0.110.0030.00516.90
8.0.100.0040.00416.89
8.0.90.0050.00316.79
8.0.80.0060.00916.96
8.0.70.0000.00716.84
8.0.60.0000.00716.79
8.0.50.0050.00217.02
8.0.30.0080.00817.02
8.0.20.0160.00717.40
8.0.10.0040.00416.87
8.0.00.0100.01016.69
7.4.330.0000.00516.79
7.4.320.0000.00716.54
7.4.300.0000.00616.57
7.4.290.0050.00316.52
7.4.280.0060.00316.58
7.4.270.0030.00616.59
7.4.260.0060.00316.48
7.4.250.0040.00416.60
7.4.240.0030.00316.65
7.4.230.0030.00316.53
7.4.220.0090.01016.51
7.4.210.0060.00816.46
7.4.200.0030.00316.68
7.4.160.0120.00416.78
7.4.150.0120.01617.40
7.4.140.0120.01117.86
7.4.130.0060.01116.48
7.4.120.0080.01216.51
7.4.110.0100.01016.74
7.4.100.0070.01016.34
7.4.90.0060.01316.47
7.4.80.0090.01519.39
7.4.70.0040.01216.61
7.4.60.0090.00916.40
7.4.50.0060.00916.66
7.4.40.0100.00716.51
7.4.30.0040.01816.71
7.4.00.0060.00915.08
7.3.330.0000.00513.26
7.3.320.0000.00613.35
7.3.310.0070.00016.32
7.3.300.0000.00716.26
7.3.290.0100.00616.36
7.3.280.0070.01116.38
7.3.270.0120.00617.40
7.3.260.0060.01116.64
7.3.250.0140.00416.41
7.3.240.0070.01416.63
7.3.230.0170.00316.57
7.3.210.0140.00316.46
7.3.200.0030.01216.31
7.3.190.0120.00516.72
7.3.180.0070.01316.49
7.3.170.0050.02116.48
7.3.160.0160.00016.41
7.2.330.0160.00516.89
7.2.320.0110.00616.78
7.2.310.0070.01416.70
7.2.300.0180.00716.59
7.2.290.0150.00316.70
7.2.60.0070.00717.13
7.2.00.0040.00819.48
7.1.200.0030.00615.82
7.1.100.0070.01117.86
7.1.70.0000.01117.33
7.1.60.0180.00719.24
7.1.50.0070.00716.97
7.1.00.0070.07322.40
7.0.200.0800.00914.71
7.0.60.0170.04019.95
7.0.50.0030.05717.87
7.0.40.0170.07719.96
7.0.30.0200.04020.25
7.0.20.0200.03720.12
7.0.10.0000.04720.08
7.0.00.0100.03720.17
5.6.280.0030.04720.90
5.6.210.0030.04320.53
5.6.200.0000.04318.29
5.6.190.0000.04720.43
5.6.180.0270.06720.63
5.6.170.0230.05720.55
5.6.160.0070.07720.62
5.6.150.0170.07018.19
5.6.140.0030.04318.15
5.6.130.0130.04718.24
5.6.120.0130.07321.02
5.6.110.0130.07720.99
5.6.100.0130.05321.09
5.6.90.0070.05321.10
5.6.80.0130.06720.29
5.5.350.0400.05320.47
5.5.340.0070.08017.95
5.5.330.0100.08020.29
5.5.320.0430.07020.41
5.5.310.0270.07720.34
5.5.300.0170.07317.97
5.5.290.0230.04017.98
5.5.280.0100.06020.90
5.5.270.0100.07720.72
5.5.260.0070.04020.76
5.5.250.0100.08320.59
5.5.240.0030.07020.16

preferences:
61.54 ms | 401 KiB | 5 Q