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) { var_dump('here'); $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.0070.01018.30
8.3.50.0070.01522.11
8.3.40.0070.00718.72
8.3.30.0130.01018.80
8.3.20.0090.00020.29
8.3.10.0090.00020.44
8.3.00.0090.00021.90
8.2.180.0110.00418.16
8.2.170.0140.00722.96
8.2.160.0070.00722.07
8.2.150.0030.00624.18
8.2.140.0060.00324.66
8.2.130.0000.00820.84
8.2.120.0000.00726.35
8.2.110.0040.00421.07
8.2.100.0060.00617.84
8.2.90.0000.00818.34
8.2.80.0090.00018.22
8.2.70.0030.00517.63
8.2.60.0060.00317.75
8.2.50.0030.00617.50
8.2.40.0100.00017.63
8.2.30.0070.00419.54
8.2.20.0040.00417.73
8.2.10.0040.00418.09
8.2.00.0050.00318.26
8.1.280.0110.00725.92
8.1.270.0080.00022.01
8.1.260.0050.00328.09
8.1.250.0130.00328.09
8.1.240.0060.00323.83
8.1.230.0040.00722.75
8.1.220.0040.00417.74
8.1.210.0030.00618.77
8.1.200.0090.00317.47
8.1.190.0030.00617.10
8.1.180.0050.00318.10
8.1.170.0070.00319.00
8.1.160.0000.00720.84
8.1.150.0040.00419.00
8.1.140.0000.00819.55
8.1.130.0050.00317.82
8.1.120.0040.00417.49
8.1.110.0000.00717.52
8.1.100.0000.00717.46
8.1.90.0000.00817.54
8.1.80.0070.00017.43
8.1.70.0070.00017.41
8.1.60.0030.00517.50
8.1.50.0030.00617.45
8.1.40.0050.00317.55
8.1.30.0000.00817.59
8.1.20.0000.00817.50
8.1.10.0000.00717.61
8.1.00.0040.00417.52
8.0.300.0040.00419.89
8.0.290.0040.00416.75
8.0.280.0070.00018.39
8.0.270.0070.00017.24
8.0.260.0030.00317.20
8.0.250.0030.00316.96
8.0.240.0000.01116.98
8.0.230.0040.00417.00
8.0.220.0070.00416.95
8.0.210.0000.00716.93
8.0.200.0030.00316.88
8.0.190.0040.00416.95
8.0.180.0000.00816.94
8.0.170.0000.00717.05
8.0.160.0050.00317.05
8.0.150.0070.00016.84
8.0.140.0050.00316.90
8.0.130.0050.00013.37
8.0.120.0050.00316.91
8.0.110.0040.00416.82
8.0.100.0050.00316.95
8.0.90.0040.00416.71
8.0.80.0110.00416.98
8.0.70.0040.00416.96
8.0.60.0070.00016.94
8.0.50.0000.00816.75
8.0.30.0130.00817.13
8.0.20.0130.01017.42
8.0.10.0000.00717.10
8.0.00.0070.01016.70
7.4.330.0050.00016.74
7.4.320.0000.00716.56
7.4.300.0030.00316.50
7.4.290.0070.00016.55
7.4.280.0080.00016.64
7.4.270.0000.00816.52
7.4.260.0070.00216.52
7.4.250.0060.00316.51
7.4.240.0070.00016.62
7.4.230.0040.00416.56
7.4.220.0240.00716.57
7.4.210.0060.00816.57
7.4.200.0040.00416.55
7.4.160.0120.00316.68
7.4.150.0110.01217.40
7.4.140.0120.01317.86
7.4.130.0070.01316.66
7.4.120.0090.01216.59
7.4.110.0160.00416.49
7.4.100.0130.00316.48
7.4.90.0090.01516.52
7.4.80.0070.01019.39
7.4.70.0060.01016.60
7.4.60.0160.00316.44
7.4.50.0030.01016.46
7.4.40.0160.00616.54
7.4.30.0100.00616.34
7.4.00.0100.00514.91
7.3.330.0050.00013.37
7.3.320.0000.00513.42
7.3.310.0030.00316.38
7.3.300.0040.00416.20
7.3.290.0100.00816.38
7.3.280.0090.00816.39
7.3.270.0090.00917.40
7.3.260.0160.00316.35
7.3.250.0130.00816.57
7.3.240.0070.01016.63
7.3.230.0080.00816.58
7.3.210.0060.01116.59
7.3.200.0080.01016.44
7.3.190.0060.01616.45
7.3.180.0130.01016.46
7.3.170.0110.01116.53
7.3.160.0100.00716.40
7.3.120.0050.01014.94
7.3.110.0050.01214.96
7.3.100.0060.00814.74
7.3.90.0060.00814.79
7.3.80.0050.00514.99
7.3.70.0070.01014.90
7.3.60.0000.01314.80
7.3.50.0060.01014.83
7.3.40.0070.00814.86
7.3.30.0070.01014.72
7.3.20.0080.00316.59
7.3.10.0050.00916.72
7.3.00.0050.00916.71
7.2.330.0150.01016.82
7.2.320.0100.00616.46
7.2.310.0100.01016.68
7.2.300.0150.00916.50
7.2.290.0100.00716.84
7.2.250.0110.01114.82
7.2.240.0110.00314.82
7.2.230.0050.01115.24
7.2.220.0100.00315.04
7.2.210.0030.01115.12
7.2.200.0030.01315.02
7.2.190.0040.00814.98
7.2.180.0080.00714.96
7.2.170.0040.01114.98
7.2.160.0100.00614.75
7.2.150.0070.01016.77
7.2.140.0070.00716.93
7.2.130.0040.00816.96
7.2.120.0000.01116.94
7.2.110.0000.01216.90
7.2.100.0030.01016.62
7.2.90.0060.00616.95
7.2.80.0000.01416.73
7.2.70.0030.00616.66
7.2.60.0030.01317.07
7.2.50.0070.01116.98
7.2.40.0110.00416.72
7.2.30.0120.00016.93
7.2.20.0040.00716.94
7.2.10.0060.00617.04
7.2.00.0060.00518.22
7.1.330.0060.00915.85
7.1.320.0040.00815.89
7.1.310.0110.00515.87
7.1.300.0030.00815.96
7.1.290.0080.00915.75
7.1.280.0060.00915.78
7.1.270.0070.00715.67
7.1.260.0050.00815.88
7.1.250.0110.00315.94
7.1.200.0070.00315.85
7.1.100.0040.00917.98
7.1.70.0000.00816.92
7.1.60.0120.01219.24
7.1.50.0060.00616.88
7.1.00.0000.07722.46
7.0.200.0590.00614.82
7.0.60.0370.07719.92
7.0.50.0030.04717.93
7.0.40.0100.08720.11
7.0.30.0030.05320.06
7.0.20.0230.04020.07
7.0.10.0100.08720.33
7.0.00.0200.07320.05
5.6.280.0030.06721.13
5.6.210.0030.04320.45
5.6.200.0170.07018.12
5.6.190.0000.04720.52
5.6.180.0230.04320.67
5.6.170.0230.07720.54
5.6.160.0030.04720.43
5.6.150.0070.04318.18
5.6.140.0100.04318.15
5.6.130.0130.07718.19
5.6.120.0070.08321.10
5.6.110.0200.07020.97
5.6.100.0070.07720.98
5.6.90.0100.08321.11
5.6.80.0100.05020.54
5.5.350.0330.07720.41
5.5.340.0070.08318.02
5.5.330.0130.08020.25
5.5.320.0230.07720.24
5.5.310.0230.05720.43
5.5.300.0030.04317.96
5.5.290.0130.07317.98
5.5.280.0100.08020.65
5.5.270.0100.03320.89
5.5.260.0000.04320.79
5.5.250.0070.06020.58
5.5.240.0030.08020.37

preferences:
64.68 ms | 401 KiB | 5 Q