3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( "a" => "xxx", "b" => "xxx", "c" => array( "g" => "xxx", "a" => "xxx", "h" => "xxx", ), "d" => "xxx", "e" => array( "i" => array( "a" => "xxx", "k" => array( "l" => "xxx", "b" => "xxx", ), ), "j" => "xxx", ), "f" => "xxx", 'h' => array( 'p' => 'xxx', 'n' => 'xxx' ) ); function remove_dup_keys(&$array, &$keys = array()) { foreach ($array as $key => &$value) { if (in_array($key, $keys)) { unset($array[$key]); } else { $keys[] = $key; } } foreach ($array as $key => &$value) { if (is_array($value)) { remove_dup_keys($value, $keys); } } } remove_dup_keys($array); print_r($array);

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.5.00.0090.01220.04
8.4.150.0010.00114.05
8.4.140.0170.01317.76
8.4.130.0060.00317.82
8.4.120.0110.01020.41
8.4.110.0130.00718.84
8.4.100.0140.00617.69
8.4.90.0120.00919.34
8.4.80.0050.00517.91
8.4.70.0020.00717.89
8.4.60.0110.00919.20
8.4.50.0100.01122.16
8.4.40.0130.00719.27
8.4.30.0160.00317.55
8.4.20.0130.00720.63
8.4.10.0030.01819.48
8.3.280.0090.01120.81
8.3.270.0110.00816.62
8.3.260.0100.01016.70
8.3.250.0100.00918.89
8.3.240.0120.00616.90
8.3.230.0130.00716.60
8.3.220.0100.00917.08
8.3.210.0100.00316.54
8.3.200.0100.00816.48
8.3.190.0100.00916.81
8.3.180.0130.00616.64
8.3.170.0160.00316.79
8.3.160.0110.00716.85
8.3.150.0040.00416.84
8.3.140.0070.01117.13
8.3.130.0040.00417.11
8.3.120.0080.00018.97
8.3.110.0090.00020.94
8.3.100.0080.00024.06
8.3.90.0070.00726.77
8.3.80.0040.00418.43
8.3.70.0140.00718.30
8.3.60.0110.00418.25
8.3.50.0070.01017.52
8.3.40.0040.01118.88
8.3.30.0090.00618.58
8.3.20.0080.00021.76
8.3.10.0030.00520.53
8.3.00.0030.00619.38
8.2.290.0100.00920.43
8.2.280.0100.00918.54
8.2.270.0070.01316.44
8.2.260.0000.00816.43
8.2.250.0130.00616.50
8.2.240.0090.00919.01
8.2.230.0150.00422.58
8.2.220.0030.00637.54
8.2.210.0080.00026.77
8.2.200.0060.00318.54
8.2.190.0100.00716.64
8.2.180.0070.00718.54
8.2.170.0100.00722.96
8.2.160.0110.00420.34
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0000.00719.95
8.2.110.0000.01121.12
8.2.100.0080.00317.72
8.2.90.0000.00720.42
8.2.80.0040.00418.05
8.2.70.0000.00817.93
8.2.60.0050.00317.91
8.2.50.0040.00418.10
8.2.40.0040.00419.46
8.2.30.0030.00519.18
8.2.20.0000.00718.04
8.2.10.0000.00719.38
8.2.00.0050.00218.18
8.1.330.0130.00616.50
8.1.320.0130.00715.99
8.1.310.0170.00315.86
8.1.300.0100.00618.15
8.1.290.0000.01030.84
8.1.280.0070.01125.92
8.1.270.0060.00320.23
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00321.05
8.1.230.0080.00420.84
8.1.220.0040.00417.79
8.1.210.0060.00318.86
8.1.200.0060.00317.35
8.1.190.0030.00517.23
8.1.180.0090.00018.10
8.1.170.0000.00818.36
8.1.160.0040.00418.89
8.1.150.0030.00518.84
8.1.140.0030.00320.14
8.1.130.0030.00320.06
8.1.120.0030.00717.51
8.1.110.0060.00317.35
8.1.100.0040.00717.41
8.1.90.0040.00417.44
8.1.80.0000.00817.46
8.1.70.0040.00417.35
8.1.60.0040.00417.55
8.1.50.0000.00817.41
8.1.40.0040.00417.50
8.1.30.0000.00717.70
8.1.20.0050.00317.55
8.1.10.0070.00317.48
8.1.00.0000.00817.44
8.0.300.0080.00020.03
8.0.290.0030.00616.75
8.0.280.0000.00718.50
8.0.270.0040.00416.86
8.0.260.0000.00618.38
8.0.250.0050.00316.95
8.0.240.0030.00316.83
8.0.230.0000.00816.85
8.0.220.0050.00216.91
8.0.210.0070.00016.86
8.0.200.0000.00617.00
8.0.190.0030.00716.93
8.0.180.0080.00016.74
8.0.170.0000.00916.95
8.0.160.0050.00316.88
8.0.150.0000.00816.84
8.0.140.0040.00416.83
8.0.130.0050.00013.32
8.0.120.0000.00716.85
8.0.110.0000.00716.95
8.0.100.0040.00416.78
8.0.90.0000.00716.93
8.0.80.0050.01216.88
8.0.70.0000.00716.95
8.0.60.0040.00416.95
8.0.50.0070.00016.76
8.0.30.0110.00717.15
8.0.20.0150.00317.32
8.0.10.0040.00417.08
8.0.00.0090.00916.72
7.4.330.0000.00615.55
7.4.320.0030.00316.66
7.4.300.0060.00016.36
7.4.290.0030.00316.57
7.4.280.0060.00316.62
7.4.270.0000.00816.36
7.4.260.0050.00316.48
7.4.250.0000.00716.49
7.4.240.0000.00716.41
7.4.230.0030.00316.71
7.4.220.0000.00816.59
7.4.210.0060.01016.46
7.4.200.0030.00316.34
7.4.160.0080.00816.53
7.4.140.0120.00917.86
7.4.130.0100.00716.49
7.4.120.0090.01316.73
7.4.110.0140.00316.57
7.4.100.0100.01316.71
7.4.90.0120.00616.52
7.4.80.0100.01319.39
7.4.70.0040.01416.51
7.4.60.0030.01316.33
7.4.50.0030.01316.59
7.4.40.0090.01316.48
7.4.00.0060.00614.84
7.3.330.0050.00013.05
7.3.320.0050.00013.18
7.3.310.0070.00016.21
7.3.300.0070.00016.36
7.3.290.0040.00416.27
7.3.280.0100.00816.27
7.3.260.0110.01016.54
7.3.240.0100.00816.36
7.3.230.0090.00916.31
7.3.210.0090.00916.51
7.3.200.0150.00616.32
7.3.190.0040.01916.58
7.3.180.0050.01116.22
7.3.170.0120.00916.40
7.3.160.0070.01016.22
7.3.20.0460.00514.87
7.3.10.0470.00914.75
7.3.00.0470.00714.67
7.2.330.0130.00316.38
7.2.320.0060.00616.37
7.2.310.0100.00716.79
7.2.300.0100.00716.50
7.2.290.0110.00816.57
7.2.150.0970.00615.18
7.2.140.0520.01114.94
7.2.130.0670.00414.88
7.2.120.0570.01314.93
7.2.110.0610.01415.04
7.2.100.0610.00314.76
7.2.90.0440.01314.85
7.2.80.0450.01014.71
7.2.70.0420.01015.09
7.2.60.0580.00314.98
7.2.50.0530.00314.76
7.2.40.0470.01014.81
7.2.30.0560.00615.04
7.2.20.0620.00714.93
7.2.10.0430.00914.84
7.2.00.0350.00714.95
7.1.250.0410.01413.85

preferences:
32.57 ms | 403 KiB | 5 Q