3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ [ 'website' => [ 'id' => 'one' ], 'children' => [ [ 'website' => [ 'id' => 'one.one' ], 'children' => [ [ 'website' => [ 'id' => 'one.one.one' ], 'children' => [ [ 'website' => [ 'id' => 'one.one.one.one' ], 'children' => [] ], [ 'website' => [ 'id' => 'one.one.one.two' ], 'children' => [] ] ] ], [ 'website' => [ 'id' => 'one.one.two' ], 'children' => [ [ 'website' => [ 'id' => 'one.one.two.one' ], 'children' => [] ], [ 'website' => [ 'id' => 'one.one.two.two' ], 'children' => [] ] ] ] ] ], [ 'website' => [ 'id' => 'one.two' ], 'children' => [ [ 'website' => [ 'id' => 'one.two.one' ], 'children' => [ [ 'website' => [ 'id' => 'one.two.one.one' ], 'children' => [] ], [ 'website' => [ 'id' => 'one.two.one.two' ], 'children' => [] ] ] ], [ 'website' => [ 'id' => 'one.two.two' ], 'children' => [ [ 'website' => [ 'id' => 'one.two.two.one' ], 'children' => [] ], [ 'website' => [ 'id' => 'one.two.two.two' ], 'children' => [] ] ] ] ] ] ] ] ]; function delete_entries(&$array, $ids_to_delete) { foreach ($array['children'] as $index => &$child) { if (in_array($child['website']['id'], $ids_to_delete)) { unset($array['children'][$index]); } delete_entries($child, $ids_to_delete); } } foreach ($array as &$arr) { delete_entries($arr, array('one.one.two', 'one.two.one')); } var_export($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.4.140.0140.01317.77
8.4.130.0110.01017.67
8.4.120.0140.00624.32
8.4.110.0120.00720.66
8.4.100.0120.00819.25
8.4.90.0120.00918.64
8.4.80.0110.01117.83
8.4.70.0090.01018.11
8.4.60.0110.00618.67
8.4.50.0130.00620.53
8.4.40.0060.01317.34
8.4.30.0130.00720.26
8.4.20.0040.01120.48
8.4.10.0090.00019.37
8.3.270.0080.01216.82
8.3.260.0110.00816.71
8.3.250.0150.00417.02
8.3.240.0050.00317.42
8.3.230.0120.00816.53
8.3.220.0050.00417.13
8.3.210.0070.00716.74
8.3.200.0060.00416.85
8.3.190.0030.00417.43
8.3.180.0060.00416.72
8.3.170.0150.00317.41
8.3.160.0110.00718.17
8.3.150.0070.00316.54
8.3.140.0060.00916.53
8.3.130.0030.00618.31
8.3.120.0060.00320.73
8.3.110.0100.00716.59
8.3.100.0040.00416.62
8.3.90.0000.00826.77
8.3.80.0030.00718.18
8.3.70.0030.01216.63
8.3.60.0040.01118.52
8.3.50.0170.00316.61
8.3.40.0090.00618.88
8.3.30.0170.00318.71
8.3.20.0000.00820.91
8.3.10.0040.00420.16
8.3.00.0070.00023.53
8.2.290.0130.00620.34
8.2.280.0130.00718.55
8.2.270.0060.01217.29
8.2.260.0070.01118.16
8.2.250.0040.00416.63
8.2.240.0000.00917.26
8.2.230.0070.01120.94
8.2.220.0000.01424.06
8.2.210.0040.01426.77
8.2.200.0030.00616.63
8.2.190.0070.01116.63
8.2.180.0100.00725.92
8.2.170.0120.00322.96
8.2.160.0120.00322.05
8.2.150.0080.00025.66
8.2.140.0040.00424.66
8.2.130.0060.00326.16
8.2.120.0040.00426.16
8.2.110.0030.00721.00
8.2.100.0090.00317.91
8.2.90.0050.00317.75
8.2.80.0000.00818.73
8.2.70.0040.00417.93
8.2.60.0030.00518.16
8.2.50.0050.00318.10
8.2.40.0000.00821.11
8.2.30.0000.00719.32
8.2.20.0040.00418.20
8.2.10.0040.00418.97
8.2.00.0000.00819.43
8.1.330.0110.00821.95
8.1.320.0110.01016.31
8.1.310.0120.00318.57
8.1.300.0090.00018.69
8.1.290.0030.00630.84
8.1.280.0140.00725.92
8.1.270.0060.00320.67
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0030.00722.60
8.1.230.0070.00417.77
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0060.00617.23
8.1.190.0030.00617.25
8.1.180.0000.00818.10
8.1.170.0000.00818.71
8.1.160.0040.00419.02
8.1.150.0050.00218.65
8.1.140.0000.00718.91
8.1.130.0040.00420.05
8.1.120.0030.00617.48
8.1.110.0050.00317.47
8.1.100.0000.00717.43
8.1.90.0050.00217.46
8.1.80.0050.00317.36
8.1.70.0000.00717.48
8.1.60.0040.00417.64
8.1.50.0030.00617.51
8.1.40.0050.00517.51
8.1.30.0080.00317.56
8.1.20.0040.00417.61
8.1.10.0000.00817.49
8.1.00.0080.00017.53
8.0.300.0000.00818.77
8.0.290.0040.00416.63
8.0.280.0050.00318.45
8.0.270.0000.00718.03
8.0.260.0030.00318.46
8.0.250.0030.00316.98
8.0.240.0030.00316.91
8.0.230.0070.00017.01
8.0.220.0070.00016.84
8.0.210.0040.00416.77
8.0.200.0000.00716.97
8.0.190.0000.00716.96
8.0.180.0050.00316.93
8.0.170.0040.00416.91
8.0.160.0040.00416.84
8.0.150.0030.00516.75
8.0.140.0040.00416.77
8.0.130.0050.00313.29
8.0.120.0040.00416.80
8.0.110.0000.00716.82
8.0.100.0040.00416.75
8.0.90.0000.00716.85
8.0.80.0030.01116.88
8.0.70.0050.00216.80
8.0.60.0080.00016.84
8.0.50.0000.00816.96
8.0.30.0100.01317.08
8.0.20.0170.00417.34
8.0.10.0030.00517.09
8.0.00.0100.01216.66
7.4.330.0000.00515.55
7.4.320.0030.00316.58
7.4.300.0060.00016.67
7.4.290.0000.00916.48
7.4.280.0060.00216.66
7.4.270.0070.00016.66
7.4.260.0000.00716.49
7.4.250.0040.00416.62
7.4.240.0020.00516.59
7.4.230.0040.00416.54
7.4.220.0000.00716.36
7.4.210.0070.00916.55
7.4.200.0030.00316.52
7.4.160.0060.01216.51
7.4.140.0070.01417.86
7.4.130.0130.00316.55
7.4.120.0180.00616.59
7.4.110.0040.01716.42
7.4.100.0050.01116.48
7.4.90.0030.01416.55
7.4.80.0060.01619.39
7.4.70.0090.00916.38
7.4.60.0030.01316.49
7.4.50.0070.01016.64
7.4.40.0090.00916.80
7.4.00.0170.00014.66
7.3.330.0000.00513.45
7.3.320.0050.00013.35
7.3.310.0040.00416.40
7.3.300.0070.00016.36
7.3.290.0030.00316.34
7.3.280.0070.01116.28
7.3.260.0120.00816.42
7.3.230.0040.01416.61
7.3.210.0080.01616.33
7.3.200.0060.00916.43
7.3.190.0060.01016.37
7.3.180.0100.00716.29
7.3.170.0080.00816.39
7.3.160.0100.00716.59
7.3.120.0120.00314.62
7.3.110.0090.00614.57
7.3.100.0080.00014.83
7.3.90.0070.00715.10
7.3.80.0070.00714.69
7.3.70.0050.01014.82
7.3.60.0060.00614.80
7.3.50.0060.01014.85
7.3.40.0080.00914.75
7.3.30.0060.00814.75
7.3.20.0130.00515.22
7.3.10.0150.00615.21
7.3.00.0130.00815.23
7.2.330.0070.01016.72
7.2.320.0100.01316.82
7.2.310.0100.00616.73
7.2.300.0080.00816.75
7.2.290.0100.00616.67
7.2.240.0030.01414.97
7.2.230.0030.00914.97
7.2.220.0000.01215.03
7.2.210.0100.00315.07
7.2.200.0090.00614.98
7.2.190.0090.00615.03
7.2.180.0060.01215.01
7.2.170.0050.00914.89
7.2.160.0040.01414.94
7.2.150.0160.00715.46
7.2.140.0180.00615.52
7.2.130.0120.00915.47
7.2.120.0140.00815.50
7.2.110.0100.00715.50
7.2.100.0090.01115.44
7.2.90.0170.00615.63
7.2.80.0190.00615.51
7.2.70.0110.00615.51
7.2.60.0110.00715.46
7.2.50.0260.00715.60
7.2.40.0180.00815.50
7.2.30.0220.00715.48
7.2.20.0180.00615.51
7.2.10.0290.00615.53
7.2.00.0400.00215.49
7.1.330.0000.01215.86
7.1.320.0060.00615.81
7.1.310.0110.00415.85
7.1.300.0140.00714.52
7.1.290.0150.00314.54
7.1.280.0130.00414.47
7.1.270.0170.00514.40
7.1.260.0120.00914.38
7.1.250.0110.01014.34

preferences:
163.43 ms | 403 KiB | 5 Q