3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array("A" => "aa", "B" => ["A" => "aaa", "B" => "bb"], "C" => "cc", "D" => ["E" =>"ee"]); function array_filter_recursive(array &$array, callable $callback) { foreach ($array as $key => &$value) { if ($callback($key, $value)) unset($array[$key]); else if (is_array($value)) array_filter_recursive($value, $callback); } } function sanitizedArray(&$arr, $restrictedProperties) { foreach($restrictedProperties as $prop) { array_filter_recursive($arr, function($k, $v) use ($prop) {return $prop == $k;}); } } sanitizedArray($arr, ["D"]); print_r($arr);

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.40.0030.01218.88
8.3.30.0070.00718.71
8.3.20.0070.00021.96
8.3.10.0050.00319.10
8.3.00.0040.00421.91
8.2.170.0110.00422.96
8.2.160.0100.00322.20
8.2.150.0030.00524.18
8.2.140.0000.00824.66
8.2.130.0080.00026.16
8.2.120.0000.00726.16
8.2.110.0040.00419.30
8.2.100.0040.00717.91
8.2.90.0000.00717.84
8.2.80.0000.00817.97
8.2.70.0050.00317.93
8.2.60.0000.00918.16
8.2.50.0000.00719.21
8.2.40.0040.00420.61
8.2.30.0000.00720.54
8.2.20.0050.00318.16
8.2.10.0070.00018.83
8.2.00.0040.00418.13
8.1.270.0060.00320.87
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0090.00022.42
8.1.230.0120.00022.66
8.1.220.0050.00317.74
8.1.210.0000.00918.91
8.1.200.0040.00417.35
8.1.190.0000.00817.66
8.1.180.0040.00418.10
8.1.170.0040.00418.52
8.1.160.0040.00418.84
8.1.150.0030.00518.90
8.1.140.0040.00422.03
8.1.130.0030.00320.36
8.1.120.0070.00017.39
8.1.110.0040.00417.48
8.1.100.0000.00817.48
8.1.90.0060.00317.52
8.1.80.0000.00717.45
8.1.70.0040.00417.36
8.1.60.0070.00017.63
8.1.50.0000.00817.59
8.1.40.0090.00017.52
8.1.30.0040.00417.71
8.1.20.0000.00917.43
8.1.10.0040.00417.50
8.1.00.0030.00617.51
8.0.300.0030.00519.82
8.0.290.0040.00416.88
8.0.280.0000.00818.46
8.0.270.0030.00316.91
8.0.260.0030.00318.37
8.0.250.0040.00416.94
8.0.240.0070.00016.95
8.0.230.0020.00516.98
8.0.220.0030.00316.99
8.0.210.0000.00816.98
8.0.200.0000.00716.89
8.0.190.0000.00817.04
8.0.180.0070.00017.00
8.0.170.0000.00816.98
8.0.160.0000.00717.01
8.0.150.0080.00016.92
8.0.140.0080.00016.83
8.0.130.0060.00013.39
8.0.120.0000.00816.82
8.0.110.0030.00516.95
8.0.100.0020.00516.79
8.0.90.0030.00617.01
8.0.80.0070.00816.90
8.0.70.0000.00716.92
8.0.60.0000.00916.86
8.0.50.0030.00316.85
8.0.30.0140.00616.94
8.0.20.0090.00917.02
8.0.10.0070.01017.04
8.0.00.0100.00916.96
7.4.330.0060.00016.72
7.4.320.0000.00616.52
7.4.300.0040.00416.48
7.4.290.0040.00416.41
7.4.280.0030.00416.51
7.4.270.0000.00816.47
7.4.260.0000.00716.59
7.4.250.0030.00316.55
7.4.240.0040.00216.55
7.4.230.0030.00316.48
7.4.220.0050.00216.41
7.4.210.0100.00516.57
7.4.200.0000.00716.41
7.4.160.0130.00316.46
7.4.150.0120.00616.57
7.4.140.0100.01117.17
7.4.130.0080.00916.63
7.4.120.0090.01116.56
7.4.110.0140.00216.39
7.4.100.0070.01116.39
7.4.90.0100.00816.49
7.4.80.0090.00817.49
7.4.70.0120.00416.49
7.4.60.0110.00816.47
7.4.50.0120.00716.42
7.4.40.0100.00716.53
7.4.30.0020.01916.54
7.4.20.0080.01116.47
7.4.10.0070.01115.94
7.4.00.0060.01015.50
7.3.330.0000.00513.24
7.3.320.0050.00013.32
7.3.310.0040.00416.36
7.3.300.0030.00316.35
7.3.290.0040.01216.34
7.3.280.0120.00616.22
7.3.270.0060.01316.29
7.3.260.0090.01016.53
7.3.250.0090.00616.32
7.3.240.0110.00616.48
7.3.230.0060.01016.45
7.3.220.0130.00716.27
7.3.210.0070.01316.34
7.3.200.0120.00416.35
7.3.190.0090.00616.31
7.3.180.0040.01216.35
7.3.170.0090.00716.42
7.3.160.0120.00916.45
7.3.150.0070.01516.38
7.3.140.0060.01316.40
7.3.130.0130.00515.95
7.3.120.0050.01015.32
7.3.110.0070.00915.35
7.3.100.0070.00815.42
7.3.90.0050.01015.39
7.3.80.0070.00815.40
7.3.70.0070.00515.37
7.3.60.0060.00815.30
7.3.50.0090.00615.18
7.3.40.0060.00815.14
7.3.30.0090.00615.15
7.3.20.0100.00516.37
7.3.10.0100.00716.29
7.3.00.0100.00616.42
7.2.340.0130.01916.37
7.2.330.0160.00816.42
7.2.320.0110.01416.73
7.2.310.0150.00816.51
7.2.300.0130.01016.63
7.2.290.0130.01516.44
7.2.280.0230.00216.42
7.2.270.0170.00816.61
7.2.260.0110.01015.96
7.2.250.0090.01215.65
7.2.240.0100.00815.46
7.2.230.0110.00815.51
7.2.220.0070.00815.64
7.2.210.0060.01015.61
7.2.200.0080.00815.59
7.2.190.0070.01015.54
7.2.180.0090.00815.45
7.2.170.0100.00915.44
7.2.160.0080.00915.39
7.2.150.0080.00916.61
7.2.140.0200.00716.50
7.2.130.0110.00616.49
7.2.120.0100.00716.56
7.2.110.0120.00616.55
7.2.100.0090.00816.57
7.2.90.0150.00616.59
7.2.80.0130.00616.51
7.2.70.0090.00816.58
7.2.60.0100.00716.53
7.2.50.0110.00716.56
7.2.40.0080.00916.59
7.2.30.0100.00916.58
7.2.20.0090.00816.59
7.2.10.0090.00816.47
7.2.00.0110.00616.57
7.1.330.0150.00415.72
7.1.320.0120.00715.80
7.1.310.0100.00815.81
7.1.300.0100.00915.72
7.1.290.0110.00715.75
7.1.280.0090.00915.48
7.1.270.0110.00615.52
7.1.260.0190.00715.47
7.1.250.0120.00615.38
7.1.240.0180.00515.65
7.1.230.0160.00715.58
7.1.220.0200.01015.70
7.1.210.0130.01215.72
7.1.200.0130.00915.77
7.1.190.0270.00515.68
7.1.180.0320.00715.72
7.1.170.0120.01315.69
7.1.160.0180.00515.64
7.1.150.0150.01115.67
7.1.140.0210.00615.62
7.1.130.0190.00415.69
7.1.120.0180.00615.65
7.1.110.0130.00915.68
7.1.100.0140.00915.68
7.1.90.0140.00815.63
7.1.80.0140.01115.69
7.1.70.0200.00515.70
7.1.60.0160.00715.69
7.1.50.0190.01215.62
7.1.40.0160.00715.77
7.1.30.0180.00615.66
7.1.20.0130.01115.55
7.1.10.0170.00815.74
7.1.00.0140.00815.54
7.0.330.0250.00615.27
7.0.320.0230.00815.20
7.0.310.0210.01015.31
7.0.300.0290.00815.31
7.0.290.0210.00715.27
7.0.280.0160.01215.28
7.0.270.0190.00815.26
7.0.260.0130.01315.26
7.0.250.0150.01215.32
7.0.240.0290.00615.39
7.0.230.0170.01115.34
7.0.220.0270.01115.28
7.0.210.0200.00915.33
7.0.200.0180.00915.39
7.0.190.0150.01615.36
7.0.180.0190.01115.41
7.0.170.0220.01115.25
7.0.160.0150.01615.31
7.0.150.0210.00815.24
7.0.140.0210.00815.25
7.0.130.0270.01115.21
7.0.120.0210.00815.29
7.0.110.0210.01015.19
7.0.100.0240.00815.24
7.0.90.0180.00915.30
7.0.80.0270.01315.15
7.0.70.0250.00515.15
7.0.60.0220.00915.40
7.0.50.0230.00715.21
7.0.40.0220.00815.24
7.0.30.0220.00815.28
7.0.20.0170.01215.33
7.0.10.0440.00715.24
7.0.00.0950.00915.24
5.6.400.0240.00615.90
5.6.390.0220.01215.84
5.6.380.0190.01115.93
5.6.370.0210.00816.04
5.6.360.0180.01316.04
5.6.350.0230.01215.81
5.6.340.0210.00915.93
5.6.330.0220.00815.96
5.6.320.0180.01115.95
5.6.310.0170.01116.07
5.6.300.0210.00716.01
5.6.290.0190.00915.97
5.6.280.0200.01015.88
5.6.270.0190.01015.80
5.6.260.0150.01415.91
5.6.250.0210.01215.99
5.6.240.0180.01115.95
5.6.230.0240.00715.98
5.6.220.0250.00516.09
5.6.210.0210.00915.83
5.6.200.0190.01215.95
5.6.190.0240.01515.92
5.6.180.0200.00915.99
5.6.170.0210.01116.02
5.6.160.0160.01715.85
5.6.150.0240.00715.89
5.6.140.0270.00416.00
5.6.130.0160.01315.97
5.6.120.0260.00615.98
5.6.110.0280.00516.00
5.6.100.0190.01115.99
5.6.90.0190.01415.76
5.6.80.0170.01015.84
5.6.70.0220.01015.97
5.6.60.0150.01315.87
5.6.50.0190.01115.80
5.6.40.0200.00715.93
5.6.30.0240.00915.96
5.6.20.0180.01215.77
5.6.10.0180.01315.89
5.6.00.0140.01715.83
5.5.380.0210.00716.00
5.5.370.0200.01315.80
5.5.360.0250.00415.80
5.5.350.0190.01115.95
5.5.340.0250.00615.84
5.5.330.0230.00615.85
5.5.320.0170.01515.84
5.5.310.0150.01515.92
5.5.300.0200.00915.93
5.5.290.0180.01115.92
5.5.280.0200.01015.94
5.5.270.0200.01215.89
5.5.260.0210.01215.95
5.5.250.0200.01315.80
5.5.240.0220.00615.89
5.5.230.0160.01415.72
5.5.220.0150.01615.82
5.5.210.0130.01515.89
5.5.200.0210.00915.69
5.5.190.0180.01515.76
5.5.180.0190.01315.76
5.5.170.0180.01015.76
5.5.160.0130.01615.74
5.5.150.0210.01015.81
5.5.140.0220.01015.76
5.5.130.0220.00615.63
5.5.120.0170.01115.68
5.5.110.0230.00615.72
5.5.100.0240.00615.82
5.5.90.0200.00715.82
5.5.80.0200.00815.89
5.5.70.0160.01315.97
5.5.60.0150.01515.83
5.5.50.0180.01315.72
5.5.40.0240.01115.86
5.5.30.0200.01215.86
5.5.20.0210.00815.70
5.5.10.0180.01415.80
5.5.00.0130.01515.74
5.4.450.0130.01012.66
5.4.440.0200.00312.72
5.4.430.0160.00712.81
5.4.420.0170.00612.60
5.4.410.0190.00612.72
5.4.400.0140.00812.64
5.4.390.0160.00612.64
5.4.380.0160.00612.74
5.4.370.0170.00712.66
5.4.360.0150.01112.60
5.4.350.0140.00812.59
5.4.340.0140.01012.58
5.4.330.0110.01212.58
5.4.320.0160.00912.66
5.4.310.0140.00912.64
5.4.300.0160.00712.60
5.4.290.0150.00812.65
5.4.280.0200.00312.79
5.4.270.0100.01212.66
5.4.260.0160.00712.70
5.4.250.0060.01612.57
5.4.240.0140.01012.62
5.4.230.0170.00712.52
5.4.220.0160.00812.55
5.4.210.0140.01012.59
5.4.200.0160.00812.73
5.4.190.0160.00812.57
5.4.180.0160.00812.54
5.4.170.0120.01312.54
5.4.160.0140.00812.68
5.4.150.0180.00512.68
5.4.140.0140.00912.75
5.4.130.0200.00312.73
5.4.120.0140.00912.68
5.4.110.0160.00512.64
5.4.100.0170.00912.67
5.4.90.0150.00912.71
5.4.80.0160.00812.67
5.4.70.0140.00612.80
5.4.60.0140.01212.65
5.4.50.0160.00512.76
5.4.40.0160.00612.78
5.4.30.0120.01212.78
5.4.20.0160.00612.75
5.4.10.0150.00912.66
5.4.00.0160.00912.64
5.3.290.0150.00912.77
5.3.280.0170.00812.62
5.3.270.0170.00812.65
5.3.260.0160.00812.68
5.3.250.0170.00812.72
5.3.240.0170.00712.56
5.3.230.0150.00912.68
5.3.220.0160.00912.73
5.3.210.0200.00912.63
5.3.200.0160.00712.72
5.3.190.0170.00412.77
5.3.180.0130.01212.82
5.3.170.0150.01012.88
5.3.160.0150.00812.88
5.3.150.0140.00812.84
5.3.140.0150.01012.91
5.3.130.0160.00612.69
5.3.120.0180.01112.88
5.3.110.0170.01012.75
5.3.100.0160.00512.72
5.3.90.0120.00912.83
5.3.80.0090.01212.66
5.3.70.0120.01312.71
5.3.60.0150.00712.75
5.3.50.0170.00412.77
5.3.40.0130.00912.66
5.3.30.0200.01012.80
5.3.20.0120.01212.68
5.3.10.0100.01212.52
5.3.00.0120.00712.55
5.2.170.0120.00611.86
5.2.160.0100.00911.75
5.2.150.0130.00611.85
5.2.140.0140.00611.81
5.2.130.0140.00511.75
5.2.120.0060.01111.87
5.2.110.0110.00811.70
5.2.100.0120.00911.77
5.2.90.0150.00411.81
5.2.80.0100.01011.72
5.2.70.0060.01311.68
5.2.60.0130.00411.62
5.2.50.0090.00711.79
5.2.40.0100.01011.68
5.2.30.0090.00811.76
5.2.20.0080.01011.53
5.2.10.0160.00311.56
5.2.00.0230.00611.57
5.1.60.0020.01511.06
5.1.50.0150.00210.91
5.1.40.0140.00111.04
5.1.30.0090.00811.04
5.1.20.0110.00410.98
5.1.10.0150.00411.01
5.1.00.0120.00410.94
5.0.50.0120.00310.77
5.0.40.0100.00610.77
5.0.30.0100.00510.77
5.0.20.0070.00710.77
5.0.10.0070.00610.77
5.0.00.0060.00610.77
4.4.90.0020.00710.77
4.4.80.0060.00310.77
4.4.70.0060.00310.77
4.4.60.0080.00110.77
4.4.50.0060.00210.77
4.4.40.0090.00110.77
4.4.30.0050.00410.77
4.4.20.0060.00310.77
4.4.10.0060.00310.77
4.4.00.0080.00210.77
4.3.110.0010.00810.77
4.3.100.0050.00310.77
4.3.90.0080.00110.77
4.3.80.0050.00410.77
4.3.70.0040.00410.77
4.3.60.0050.00410.77
4.3.50.0070.00210.77
4.3.40.0090.00010.77
4.3.30.0020.00710.77
4.3.20.0020.00410.77
4.3.10.0060.00210.77
4.3.00.0040.00510.77

preferences:
82.64 ms | 400 KiB | 5 Q