3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array('test' => array('percy' => array('hello' => 'hatcherson'), 'percy' => array('mitchell', 'anderson'))); $allowed = array('test'); $combined = array(); //$combined[] = array_intersect_key($arr, array_flip($allowed)); foreach ($arr as $k => $v) { if (is_array($v)) { $combined[] = array_intersect_key($arr[$k], array_flip($allowed)); } } var_dump($combined);

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.01216.86
8.3.50.0100.00722.05
8.3.40.0040.01118.71
8.3.30.0070.00718.79
8.3.20.0040.00420.16
8.3.10.0040.00423.71
8.3.00.0000.00722.40
8.2.180.0090.00616.63
8.2.170.0110.00422.96
8.2.160.0070.01020.44
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0070.01126.16
8.2.120.0000.00722.16
8.2.110.0070.00421.96
8.2.100.0070.00417.84
8.2.90.0050.00317.97
8.2.80.0030.00617.97
8.2.70.0000.01017.63
8.2.60.0060.00318.05
8.2.50.0100.00018.07
8.2.40.0050.00219.34
8.2.30.0050.00318.20
8.2.20.0000.00717.79
8.2.10.0040.00417.63
8.2.00.0040.00417.73
8.1.280.0100.00725.92
8.1.270.0030.00523.91
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0090.00022.51
8.1.230.0070.00320.88
8.1.220.0050.00317.74
8.1.210.0080.00019.04
8.1.200.0090.00017.13
8.1.190.0060.00317.30
8.1.180.0040.00418.10
8.1.170.0040.00418.54
8.1.160.0020.00522.02
8.1.150.0040.00418.52
8.1.140.0070.00017.50
8.1.130.0030.00317.83
8.1.120.0000.00717.42
8.1.110.0070.00017.46
8.1.100.0000.00817.37
8.1.90.0070.00017.43
8.1.80.0030.00517.52
8.1.70.0050.00217.32
8.1.60.0050.00317.52
8.1.50.0000.00817.49
8.1.40.0060.00317.43
8.1.30.0030.00517.61
8.1.20.0000.00817.64
8.1.10.0050.00217.48
8.1.00.0040.00417.34
8.0.300.0040.00420.09
8.0.290.0000.00817.16
8.0.280.0040.00418.41
8.0.270.0030.00317.26
8.0.260.0080.00016.91
8.0.250.0000.00616.85
8.0.240.0050.00316.89
8.0.230.0070.00016.94
8.0.220.0030.00316.87
8.0.210.0000.00716.84
8.0.200.0030.00316.98
8.0.190.0040.00417.02
8.0.180.0000.00716.83
8.0.170.0070.00016.84
8.0.160.0070.00016.93
8.0.150.0040.00416.94
8.0.140.0040.00416.76
8.0.130.0030.00313.25
8.0.120.0000.00816.87
8.0.110.0070.00016.93
8.0.100.0000.00717.01
8.0.90.0070.00016.91
8.0.80.0130.01016.94
8.0.70.0070.00016.88
8.0.60.0050.00216.78
8.0.50.0070.00016.79
8.0.30.0050.01317.01
8.0.20.0090.01017.40
8.0.10.0000.00816.89
8.0.00.0130.00816.63
7.4.330.0000.00515.20
7.4.320.0030.00316.60
7.4.300.0000.00716.61
7.4.290.0000.00716.41
7.4.280.0000.00716.48
7.4.270.0040.00416.58
7.4.260.0030.00316.59
7.4.250.0050.00216.46
7.4.240.0040.00416.52
7.4.230.0000.00716.25
7.4.220.0070.01016.48
7.4.210.0080.01016.53
7.4.200.0000.00716.40
7.4.190.0030.00316.38
7.4.160.0030.01216.40
7.4.150.0060.01217.40
7.4.140.0080.01017.86
7.4.130.0060.01316.57
7.4.120.0110.00916.37
7.4.110.0210.02116.61
7.4.100.0120.00916.64
7.4.90.0030.01416.68
7.4.80.0060.01219.39
7.4.70.0070.01016.44
7.4.60.0170.00016.38
7.4.50.0060.00016.62
7.4.40.0100.00722.77
7.4.30.0040.01116.63
7.4.10.0050.00714.90
7.4.00.0080.00814.80
7.3.330.0060.00013.10
7.3.320.0000.00613.13
7.3.310.0060.00016.22
7.3.300.0000.00716.31
7.3.290.0070.00716.32
7.3.280.0100.00716.29
7.3.270.0110.00717.40
7.3.260.0110.00516.50
7.3.250.0070.01316.43
7.3.240.0050.01116.64
7.3.230.0080.00816.51
7.3.210.0160.01016.41
7.3.200.0070.01319.39
7.3.190.0070.01516.43
7.3.180.0100.01016.42
7.3.170.0090.00916.52
7.3.160.0100.01316.31
7.3.130.0070.01015.07
7.3.120.0110.00514.75
7.3.110.0160.00014.94
7.3.100.0000.01414.95
7.3.90.0070.00614.99
7.3.80.0070.00714.83
7.3.70.0000.01514.77
7.3.60.0090.00614.78
7.3.50.0030.00714.39
7.3.40.0050.00514.62
7.3.30.0080.00414.82
7.3.20.0060.00916.67
7.3.10.0090.00316.26
7.3.00.0090.00516.64
7.2.330.0070.01016.43
7.2.320.0090.01316.42
7.2.310.0150.00416.69
7.2.300.0080.01016.73
7.2.290.0080.00816.73
7.2.260.0140.00315.32
7.2.250.0070.01115.04
7.2.240.0090.00615.06
7.2.230.0070.00715.02
7.2.220.0030.01315.01
7.2.210.0040.01114.84
7.2.200.0040.01114.96
7.2.190.0040.00714.91
7.2.180.0090.00414.92
7.2.170.0140.00315.21
7.2.160.0090.00015.14
7.2.150.0060.00916.87
7.2.140.0040.01116.69
7.2.130.0070.00716.64
7.2.120.0100.00716.74
7.2.110.0050.00916.94
7.2.100.0100.00816.63
7.2.90.0070.00716.92
7.2.80.0080.00716.61
7.2.70.0080.00616.84
7.2.60.0070.01116.85
7.2.50.0040.01116.84
7.2.40.0100.00916.79
7.2.30.0050.01016.72
7.2.20.0090.00716.85
7.2.10.0080.00816.84
7.2.00.0070.00917.02
7.1.330.0040.00715.79
7.1.320.0070.00615.77
7.1.310.0110.00015.68
7.1.300.0050.00515.88
7.1.290.0080.00315.76
7.1.280.0060.00615.80
7.1.270.0070.00715.80
7.1.260.0060.00615.78
7.1.250.0050.01015.71
7.1.240.0060.00515.79
7.1.230.0020.01215.87
7.1.220.0030.01015.88
7.1.210.0070.00815.87
7.1.200.0020.01215.72
7.1.190.0100.00515.70
7.1.180.0050.01015.71
7.1.170.0060.01115.77
7.1.160.0100.00415.85
7.1.150.0070.00915.86
7.1.140.0050.00715.80
7.1.130.0020.01315.89
7.1.120.0070.01015.82
7.1.110.0110.00115.90
7.1.100.0050.00815.84
7.1.90.0090.00415.69
7.1.80.0050.01015.67
7.1.70.0050.00816.25
7.1.60.0060.00716.84
7.1.50.0050.01316.18
7.1.40.0040.00515.97
7.1.30.0120.00315.83
7.1.20.0070.00915.66
7.1.10.0050.00515.70
7.1.00.0060.03017.85
7.0.330.0080.00415.29
7.0.320.0050.00715.17
7.0.310.0100.00515.27
7.0.300.0090.00515.20
7.0.290.0080.00715.28
7.0.280.0060.00715.32
7.0.270.0070.01015.31
7.0.260.0070.00515.43
7.0.250.0130.00215.15
7.0.240.0070.00515.39
7.0.230.0020.01215.32
7.0.220.0040.00715.47
7.0.210.0060.00715.36
7.0.200.0280.00815.81
7.0.190.0070.00915.39
7.0.180.0030.00515.36
7.0.170.0000.01015.34
7.0.160.0020.01015.29
7.0.150.0090.00615.19
7.0.140.0090.02217.60
7.0.130.0060.00715.38
7.0.120.0060.00915.40
7.0.110.0050.00915.14
7.0.100.0040.00615.15
7.0.90.0050.00815.26
7.0.80.0080.00315.35
7.0.70.0050.00615.27
7.0.60.0080.03116.85
7.0.50.0070.02516.23
7.0.40.0060.01815.70
7.0.30.0190.02615.64
7.0.20.0060.02115.65
7.0.10.0130.01715.47
7.0.00.0070.02315.68
5.6.400.0090.00314.64
5.6.390.0030.00614.28
5.6.380.0030.00914.20
5.6.370.0070.00814.33
5.6.360.0140.00514.27
5.6.350.0070.00914.10
5.6.340.0060.01114.44
5.6.330.0080.00914.26
5.6.320.0070.01014.12
5.6.310.0070.01014.34
5.6.300.0090.00614.33
5.6.290.0030.01014.59
5.6.280.0070.02916.51
5.6.270.0050.01114.37
5.6.260.0110.00314.37
5.6.250.0100.00614.33
5.6.240.0060.00914.42
5.6.230.0030.00714.18
5.6.220.0070.00514.43
5.6.210.0080.03016.46
5.6.200.0080.03015.61
5.6.190.0030.02016.35
5.6.180.0100.02116.20
5.6.170.0130.01816.52
5.6.160.0060.02216.30
5.6.150.0080.02515.71
5.6.140.0020.02215.62
5.6.130.0040.02515.53
5.6.120.0050.01716.51
5.6.110.0050.01616.43
5.6.100.0030.03016.59
5.6.90.0090.03116.57
5.6.80.0060.03116.21
5.6.70.0120.02616.28
5.6.60.0020.01114.24
5.6.50.0030.00914.21
5.6.40.0030.00914.15
5.6.30.0050.00614.35
5.6.20.0080.00314.15
5.6.10.0010.01014.20
5.6.00.0040.00714.04
5.5.380.0010.00812.55
5.5.370.0060.00612.60
5.5.360.0070.00612.72
5.5.350.0070.03115.31
5.5.340.0020.01714.45
5.5.330.0090.01815.16
5.5.320.0030.01915.21
5.5.310.0120.03015.29
5.5.300.0070.01314.62
5.5.290.0080.01914.40
5.5.280.0060.01915.36
5.5.270.0030.02715.50
5.5.260.0070.01615.43
5.5.250.0060.03015.36
5.5.240.0050.02715.21
5.5.230.0060.00612.57
5.5.220.0080.00212.63
5.5.210.0030.00912.70
5.5.200.0020.01012.65
5.5.190.0040.00512.63
5.5.180.0030.00812.72
5.5.170.0030.00712.69
5.5.160.0070.00412.60
5.5.150.0030.00812.49
5.5.140.0050.00612.41
5.5.130.0000.01012.54
5.5.120.0040.00612.56
5.5.110.0090.00212.72
5.5.100.0050.00812.80
5.5.90.0080.00212.67
5.5.80.0040.00712.66
5.5.70.0040.00712.76
5.5.60.0030.00712.63
5.5.50.0050.00712.87
5.5.40.0030.00612.68
5.5.30.0040.00412.76
5.5.20.0040.00812.52
5.5.10.0070.00412.79
5.5.00.0020.00612.63
5.4.450.0300.01713.92
5.4.440.0290.02513.83
5.4.430.0090.02313.88
5.4.420.0230.02513.95
5.4.410.0120.02913.77
5.4.400.0260.02613.69
5.4.390.0260.01813.65
5.4.380.0090.02113.59
5.4.370.0070.02013.55
5.4.360.0060.02213.49
5.4.350.0090.02113.65
5.4.340.0060.02313.43
5.4.330.0040.00511.00
5.4.320.0070.01511.51
5.4.310.0050.02011.43
5.4.300.0060.01611.56
5.4.290.0050.01811.42
5.4.280.0060.01511.44
5.4.270.0040.01311.55
5.4.260.0050.01911.48
5.4.250.0050.01511.39
5.4.240.0070.01511.38
5.4.230.0020.01711.51
5.4.220.0060.01711.39
5.4.210.0040.01511.43
5.4.200.0080.01711.45
5.4.190.0060.01911.37
5.4.180.0090.01911.46
5.4.170.0100.01711.38
5.4.160.0080.01711.50
5.4.150.0040.02011.37
5.4.140.0120.03511.34
5.4.130.0040.02111.34
5.4.120.0090.01711.31
5.4.110.0070.01911.25
5.4.100.0080.01611.30
5.4.90.0070.01711.25
5.4.80.0080.01811.32
5.4.70.0100.01911.25
5.4.60.0080.02011.25
5.4.50.0070.01911.26
5.4.40.0090.01711.31
5.4.30.0070.01811.27
5.4.20.0080.01911.26
5.4.10.0160.03111.24
5.4.00.0090.01611.23
5.3.290.0090.01511.53
5.3.280.0040.01611.50
5.3.270.0060.02011.51
5.3.260.0090.01811.51
5.3.250.0120.01411.51
5.3.240.0060.01911.51
5.3.230.0080.02011.50
5.3.220.0080.02011.49
5.3.210.0160.03211.49
5.3.200.0090.01911.49
5.3.190.0070.02111.49
5.3.180.0140.03211.49
5.3.170.0100.01611.49
5.3.160.0080.01911.49
5.3.150.0060.01911.49
5.3.140.0060.02011.49
5.3.130.0070.02011.49
5.3.120.0090.01711.49
5.3.110.0110.01711.48
5.3.100.0040.02211.31
5.3.90.0100.01711.29
5.3.80.0070.01811.29
5.3.70.0100.03711.29
5.3.60.0070.01911.29
5.3.50.0070.01911.27
5.3.40.0070.02011.27
5.3.30.0080.01711.24
5.3.20.0070.02011.17
5.3.10.0080.01811.16
5.3.00.0110.01511.15
5.2.170.0070.01910.03
5.2.160.0140.02910.03
5.2.150.0060.02110.03
5.2.140.0100.01910.03
5.2.130.0080.01810.01
5.2.120.0080.02010.01
5.2.110.0100.01910.01
5.2.100.0090.01610.01
5.2.90.0060.02010.01
5.2.80.0060.02110.01
5.2.70.0070.01910.01
5.2.60.0070.0199.98
5.2.50.0090.0189.97
5.2.40.0170.0419.96
5.2.30.0090.0199.94
5.2.20.0050.0209.94
5.2.10.0080.0199.90
5.2.00.0050.0219.83
5.1.60.0080.0159.47
5.1.50.0040.0199.47
5.1.40.0080.0159.46
5.1.30.0070.0179.64
5.1.20.0070.0199.65
5.1.10.0090.0179.51
5.1.00.0070.0159.51
5.0.50.0060.0148.75
5.0.40.0050.0158.68
5.0.30.0040.0208.58
5.0.20.0060.0128.57
5.0.10.0050.0138.56
5.0.00.0040.0218.55
4.4.90.0020.0137.84
4.4.80.0040.0107.83
4.4.70.0040.0127.83
4.4.60.0050.0107.83
4.4.50.0030.0127.83
4.4.40.0040.0157.80
4.4.30.0040.0117.83
4.4.20.0020.0137.87
4.4.10.0040.0117.87
4.4.00.0050.0147.83
4.3.110.0030.0147.78
4.3.100.0020.0127.78
4.3.90.0060.0097.77
4.3.80.0030.0167.74
4.3.70.0020.0127.77
4.3.60.0020.0137.76
4.3.50.0150.0287.76
4.3.40.0020.0177.72
4.3.30.0050.0097.09
4.3.20.0030.0107.08
4.3.10.0030.0127.06
4.3.00.0080.00812.17

preferences:
55.43 ms | 401 KiB | 5 Q