3v4l.org

run code in 300+ PHP versions simultaneously
<?php $blah= array(array('a'=> array('name' => 'test', 'alias' => 'testa'), '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); var_dump($blank);

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.0090.01218.43
8.3.50.0190.00222.05
8.3.40.0070.00718.89
8.3.30.0100.00718.67
8.3.20.0030.00620.34
8.3.10.0040.00420.39
8.3.00.0060.00321.73
8.2.180.0120.00318.26
8.2.170.0110.00722.96
8.2.160.0070.00722.13
8.2.150.0000.00824.18
8.2.140.0070.00324.66
8.2.130.0030.00526.16
8.2.120.0040.00421.11
8.2.110.0060.00321.00
8.2.100.0120.00017.91
8.2.90.0050.00317.69
8.2.80.0040.00418.22
8.2.70.0030.00617.47
8.2.60.0040.00417.80
8.2.50.0050.00318.09
8.2.40.0040.00420.39
8.2.30.0050.00519.51
8.2.20.0050.00317.64
8.2.10.0050.00218.00
8.2.00.0040.00418.00
8.1.280.0150.00625.92
8.1.270.0110.01122.04
8.1.260.0000.00826.35
8.1.250.0080.00028.09
8.1.240.0090.00022.65
8.1.230.0060.00620.85
8.1.220.0080.00017.74
8.1.210.0040.00418.93
8.1.200.0060.00317.35
8.1.190.0000.00817.38
8.1.180.0030.00518.10
8.1.170.0000.00918.53
8.1.160.0070.00020.66
8.1.150.0000.00718.89
8.1.140.0000.00819.59
8.1.130.0040.00417.78
8.1.120.0000.00717.51
8.1.110.0040.00417.49
8.1.100.0000.00717.53
8.1.90.0030.00617.38
8.1.80.0000.00717.36
8.1.70.0000.00717.52
8.1.60.0000.00817.58
8.1.50.0060.00317.57
8.1.40.0050.00317.43
8.1.30.0000.00817.55
8.1.20.0000.00917.39
8.1.10.0000.00817.50
8.1.00.0040.00417.50
8.0.300.0000.00819.98
8.0.290.0040.00416.63
8.0.280.0030.00318.37
8.0.270.0040.00417.30
8.0.260.0030.00317.25
8.0.250.0030.00316.95
8.0.240.0040.00816.83
8.0.230.0060.00316.99
8.0.220.0040.00716.85
8.0.210.0040.00416.94
8.0.200.0040.00416.93
8.0.190.0040.00416.95
8.0.180.0000.00816.93
8.0.170.0030.00516.99
8.0.160.0060.00316.84
8.0.150.0040.00416.75
8.0.140.0000.00716.71
8.0.130.0030.00313.38
8.0.120.0040.00416.90
8.0.110.0040.00416.81
8.0.100.0030.00516.89
8.0.90.0040.00416.68
8.0.80.0060.00916.79
8.0.70.0000.00716.86
8.0.60.0040.00417.02
8.0.50.0030.00516.86
8.0.30.0100.01017.23
8.0.20.0140.00917.40
8.0.10.0060.00316.84
8.0.00.0110.00916.89
7.4.330.0060.00016.76
7.4.320.0000.00616.46
7.4.300.0030.00316.63
7.4.290.0040.00416.61
7.4.280.0080.00016.52
7.4.270.0030.00616.55
7.4.260.0000.00513.29
7.4.250.0060.00316.60
7.4.240.0050.00216.46
7.4.230.0030.00516.72
7.4.220.0120.00616.68
7.4.210.0090.00616.74
7.4.200.0040.00416.53
7.4.160.0160.00616.76
7.4.150.0120.00617.40
7.4.140.0110.01017.86
7.4.130.0140.00616.46
7.4.120.0140.01216.52
7.4.110.0060.01116.66
7.4.100.0190.00016.64
7.4.90.0120.00616.32
7.4.80.0170.00719.39
7.4.70.0090.01316.72
7.4.60.0070.01116.49
7.4.50.0040.01416.53
7.4.40.0120.01216.48
7.4.30.0090.01316.55
7.4.00.0040.01115.12
7.3.330.0030.00313.37
7.3.320.0030.00313.25
7.3.310.0030.00516.37
7.3.300.0030.00316.32
7.3.290.0110.00516.38
7.3.280.0100.00716.38
7.3.270.0070.01017.40
7.3.260.0120.00616.54
7.3.250.0090.01016.48
7.3.240.0090.00916.39
7.3.230.0080.01216.39
7.3.210.0100.00716.52
7.3.200.0050.01316.40
7.3.190.0130.00516.38
7.3.180.0170.00316.44
7.3.170.0170.00416.47
7.3.160.0130.00816.68
7.3.10.0030.00616.61
7.3.00.0050.00916.77
7.2.330.0140.00616.80
7.2.320.0120.00616.78
7.2.310.0130.00616.37
7.2.300.0080.01116.80
7.2.290.0060.01116.63
7.2.130.0100.00716.94
7.2.120.0100.00616.70
7.2.110.0060.01016.82
7.2.100.0080.00716.79
7.2.90.0090.00816.97
7.2.80.0070.00716.91
7.2.70.0050.01116.91
7.2.60.0080.00616.91
7.2.50.0040.00917.02
7.2.40.0100.00716.68
7.2.30.0080.00616.76
7.2.20.0110.00516.87
7.2.10.0040.01016.85
7.2.00.0090.00417.75
7.1.250.0080.00815.94
7.1.240.0120.00615.57
7.1.230.0190.00015.30
7.1.220.0070.01115.86
7.1.210.0060.01215.71
7.1.200.0090.00615.90
7.1.190.0060.00915.82
7.1.180.0070.00715.76
7.1.170.0070.01115.66
7.1.160.0080.00815.70
7.1.150.0130.00315.82
7.1.140.0140.00015.79
7.1.130.0100.00315.63
7.1.120.0090.00915.92
7.1.110.0110.00615.79
7.1.100.0080.00816.98
7.1.90.0130.00315.80
7.1.80.0140.00315.79
7.1.70.0100.00716.42
7.1.60.0130.00717.50
7.1.50.0110.00616.25
7.1.40.0040.01115.73
7.1.30.0110.00315.60
7.1.20.0160.00415.73
7.1.10.0110.01115.82
7.1.00.0070.04219.25
7.0.330.0160.00415.43
7.0.320.0150.00415.30
7.0.310.0100.00315.18
7.0.300.0040.01115.19
7.0.290.0090.00615.39
7.0.280.0140.00015.41
7.0.270.0090.00315.49
7.0.260.0070.00715.31
7.0.250.0050.00915.16
7.0.240.0100.00715.20
7.0.230.0090.00915.09
7.0.220.0110.00715.15
7.0.210.0080.00814.89
7.0.200.0420.01014.76
7.0.190.0070.00715.36
7.0.180.0150.00015.54
7.0.170.0130.00615.55
7.0.160.0140.00315.21
7.0.150.0080.00815.36
7.0.140.0120.00915.27
7.0.130.0040.00815.16
7.0.120.0080.00815.58
7.0.110.0060.00615.45
7.0.100.0070.00715.36
7.0.90.0070.00715.51
7.0.80.0140.00415.30
7.0.70.0030.01015.39
7.0.60.0170.01817.62
7.0.50.0100.02416.75
7.0.40.0080.03516.69
7.0.30.0120.02616.79
7.0.20.0120.02216.68
7.0.10.0100.02216.70
7.0.00.0070.02216.62
5.6.380.0000.01214.38
5.6.370.0060.00714.54
5.6.360.0130.00014.01
5.6.350.0040.00713.87
5.6.340.0080.00514.43
5.6.330.0030.00814.20
5.6.320.0060.00314.49
5.6.310.0030.00913.95
5.6.300.0020.00714.34
5.6.290.0070.00514.29
5.6.280.0050.02217.85
5.6.270.0040.00414.11
5.6.260.0100.00314.35
5.6.250.0070.00314.43
5.6.240.0120.00014.29
5.6.230.0070.00314.19
5.6.220.0050.00514.24
5.6.210.0020.02717.56
5.6.200.0020.02516.25
5.6.190.0030.05017.35
5.6.180.0200.03717.58
5.6.170.0130.04217.57
5.6.160.0050.02317.33
5.6.150.0090.04016.25
5.6.140.0070.02216.23
5.6.130.0050.02616.27
5.6.120.0050.04417.69
5.6.110.0120.04017.74
5.6.100.0050.03617.61
5.6.90.0080.04517.67
5.6.80.0080.04117.33
5.6.70.0090.00314.08
5.6.60.0090.00314.39
5.6.50.0030.01014.17
5.6.40.0030.00714.56
5.6.30.0030.00714.62
5.6.20.0070.01014.22
5.6.10.0030.01014.30
5.6.00.0030.01014.39
5.5.380.0040.00411.29
5.5.370.0070.00010.96
5.5.360.0060.00611.30
5.5.350.0230.03615.71
5.5.340.0080.03814.47
5.5.330.0070.02515.92
5.5.320.0150.04215.79
5.5.310.0080.04215.71
5.5.300.0030.04714.66
5.5.290.0030.04414.63
5.5.280.0080.04116.24
5.5.270.0090.04215.82
5.5.260.0050.02215.96
5.5.250.0030.04315.82
5.5.240.0080.03815.79
5.5.230.0060.00311.25
5.5.220.0060.00311.47
5.5.210.0040.00411.16
5.5.200.0090.00011.22
5.5.190.0090.00011.50
5.5.180.0000.00511.26
5.5.170.0000.00811.15
5.5.160.0060.00311.17
5.5.150.0000.01011.08
5.5.140.0050.00511.12
5.5.130.0060.00011.31
5.5.120.0000.01211.14
5.5.110.0020.00511.06
5.5.100.0040.00811.19
5.5.90.0040.00411.14
5.5.80.0060.00011.25
5.5.70.0000.00811.20
5.5.60.0030.00611.37
5.5.50.0000.00611.45
5.5.40.0030.00711.48
5.5.30.0060.00611.23
5.5.20.0030.00311.20
5.5.10.0060.00611.34
5.5.00.0030.00311.23

preferences:
61.81 ms | 401 KiB | 5 Q