3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = array('a'=>'a','b'=>'b','c'=>'c','d' =>'d','e' =>'e'); $array2 = array('a','c','e'); $array = array_filter($array1, function($key) use ($array2) { return in_array($key, $array2); }, ARRAY_FILTER_USE_KEY); var_dump($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.3.60.0070.00718.56
8.3.50.0090.01221.16
8.3.40.0110.00418.85
8.3.30.0140.00019.05
8.3.20.0040.00420.34
8.3.10.0080.00023.61
8.3.00.0000.01117.63
8.2.180.0130.00616.50
8.2.170.0140.00722.96
8.2.160.0070.00720.35
8.2.150.0040.00424.18
8.2.140.0090.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00422.23
8.2.110.0050.00322.00
8.2.100.0120.00017.78
8.2.90.0040.00419.21
8.2.80.0030.00517.97
8.2.70.0050.00317.63
8.2.60.0040.00417.93
8.2.50.0000.00818.07
8.2.40.0000.00818.09
8.2.30.0030.00617.93
8.2.20.0080.00017.65
8.2.10.0040.00417.99
8.2.00.0040.00417.73
8.1.280.0090.00625.92
8.1.270.0080.00023.83
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0070.00322.05
8.1.230.0110.00019.21
8.1.220.0080.00017.74
8.1.210.0000.00918.77
8.1.200.0040.00417.48
8.1.190.0030.00517.22
8.1.180.0060.00618.10
8.1.170.0000.00818.64
8.1.160.0000.00722.01
8.1.150.0060.00318.95
8.1.140.0000.00717.44
8.1.130.0070.00017.69
8.1.120.0050.00317.38
8.1.110.0050.00317.35
8.1.100.0070.00017.36
8.1.90.0000.00717.43
8.1.80.0040.00317.38
8.1.70.0070.00017.46
8.1.60.0040.00417.57
8.1.50.0040.00417.51
8.1.40.0000.00817.50
8.1.30.0030.00617.55
8.1.20.0040.00417.54
8.1.10.0000.00717.52
8.1.00.0040.00417.34
8.0.300.0070.00018.77
8.0.290.0000.00716.75
8.0.280.0000.00718.40
8.0.270.0050.00217.18
8.0.260.0030.00317.24
8.0.250.0000.00716.90
8.0.240.0030.00316.90
8.0.230.0030.00416.93
8.0.220.0060.00316.79
8.0.210.0030.00316.80
8.0.200.0060.00016.87
8.0.190.0030.00516.83
8.0.180.0000.00716.92
8.0.170.0000.00816.88
8.0.160.0030.00516.88
8.0.150.0030.00316.81
8.0.140.0000.00716.77
8.0.130.0000.00813.37
8.0.120.0000.00716.80
8.0.110.0030.00516.97
8.0.100.0000.00717.00
8.0.90.0050.00316.77
8.0.80.0110.00816.94
8.0.70.0030.00516.73
8.0.60.0080.00016.75
8.0.50.0050.00216.94
8.0.30.0120.00817.10
8.0.20.0180.00717.40
8.0.10.0040.00417.07
8.0.00.0080.00816.83
7.4.330.0000.00515.00
7.4.320.0060.00016.60
7.4.300.0070.00016.63
7.4.290.0050.00316.41
7.4.280.0040.00416.57
7.4.270.0000.00716.48
7.4.260.0040.00416.46
7.4.250.0080.00016.37
7.4.240.0070.00016.51
7.4.230.0000.00716.57
7.4.220.0040.01416.48
7.4.210.0140.00316.55
7.4.200.0000.00716.57
7.4.160.0120.00416.37
7.4.150.0130.00617.40
7.4.140.0110.01017.86
7.4.130.0140.00616.45
7.4.120.0080.00916.54
7.4.110.0110.00916.55
7.4.100.0150.00316.52
7.4.90.0040.01416.55
7.4.80.0090.00919.39
7.4.70.0100.00616.63
7.4.60.0120.00616.52
7.4.50.0060.00316.38
7.4.40.0140.00316.48
7.4.30.0120.00916.72
7.4.00.0000.01814.71
7.3.330.0030.00313.27
7.3.320.0030.00313.29
7.3.310.0000.00716.25
7.3.300.0040.00416.20
7.3.290.0040.01016.25
7.3.280.0100.00816.29
7.3.270.0150.00617.40
7.3.260.0080.00816.21
7.3.240.0100.00716.27
7.3.230.0130.00316.39
7.3.210.0130.00316.58
7.3.200.0140.00319.39
7.3.190.0130.01016.40
7.3.180.0080.00816.32
7.3.170.0060.01016.27
7.3.160.0070.01116.20
7.3.00.0110.00616.27
7.2.330.0090.00916.48
7.2.320.0100.00716.52
7.2.310.0110.01216.34
7.2.300.0110.00716.51
7.2.290.0120.00916.70
7.2.130.0080.00616.88
7.2.120.0000.01216.82
7.2.110.0030.01317.01
7.2.100.0000.01417.04
7.2.90.0060.00916.91
7.2.80.0150.00316.55
7.2.70.0090.00916.66
7.2.60.0060.00716.89
7.2.50.0090.00017.02
7.2.40.0040.01117.11
7.2.30.0040.00716.82
7.2.20.0090.00616.79
7.2.10.0030.01016.93
7.2.00.0030.01017.98
7.1.250.0070.00715.85
7.1.240.0070.00315.80
7.1.230.0040.00715.82
7.1.220.0030.00715.74
7.1.210.0060.00615.91
7.1.200.0060.00815.76
7.1.190.0130.00015.60
7.1.180.0030.01315.72
7.1.170.0030.00615.62
7.1.160.0100.00315.92
7.1.150.0000.01515.72
7.1.140.0000.01315.91
7.1.130.0030.01015.63
7.1.120.0030.01015.95
7.1.110.0070.00315.86
7.1.100.0030.00817.01
7.1.90.0040.01015.86
7.1.80.0150.00015.79
7.1.70.0050.00616.49
7.1.60.0090.00617.55
7.1.50.0050.01116.21
7.1.40.0030.00615.68
7.1.30.0070.00715.81
7.1.20.0030.00715.72
7.1.10.0100.00315.52
7.1.00.0080.03519.19
7.0.330.0060.00615.11
7.0.320.0070.00315.12
7.0.310.0000.01515.13
7.0.300.0090.00615.19
7.0.290.0100.00315.14
7.0.280.0060.01015.23
7.0.270.0040.01115.09
7.0.260.0000.00915.17
7.0.250.0040.00814.95
7.0.240.0040.01015.24
7.0.230.0110.00015.30
7.0.220.0090.00314.75
7.0.210.0040.00715.41
7.0.200.0020.01116.03
7.0.190.0070.00315.32
7.0.180.0080.00415.50
7.0.170.0070.00715.27
7.0.160.0030.00715.15
7.0.150.0060.00615.32
7.0.140.0070.03518.75
7.0.130.0000.01015.46
7.0.120.0100.00315.25
7.0.110.0060.00815.08
7.0.100.0080.00515.24
7.0.90.0000.01315.20
7.0.80.0040.00715.25
7.0.70.0080.00415.10
7.0.60.0100.03217.48
7.0.50.0080.04216.65
7.0.40.0050.04916.70
7.0.30.0180.03316.81
7.0.20.0240.04216.72
7.0.10.0060.03716.66
7.0.00.0070.04116.77
5.6.380.0130.00014.18
5.6.370.0000.01314.13
5.6.360.0060.00614.14
5.6.350.0030.00714.31
5.6.340.0100.00714.45
5.6.330.0000.01014.08
5.6.320.0100.00714.23
5.6.310.0100.00013.91
5.6.300.0030.00914.02
5.6.290.0090.00314.29
5.6.280.0040.03917.44
5.6.270.0030.00614.22
5.6.260.0000.01214.21
5.6.250.0040.00413.88
5.6.240.0040.00414.27
5.6.230.0040.00714.14
5.6.220.0030.01013.95
5.6.210.0100.03517.42
5.6.200.0030.04116.17
5.6.190.0030.02517.36
5.6.180.0170.03917.33
5.6.170.0190.02217.24
5.6.160.0090.02017.21
5.6.150.0070.03716.09
5.6.140.0060.04216.30
5.6.130.0090.04516.09
5.6.120.0020.02717.62
5.6.110.0040.02617.42
5.6.100.0050.03717.59
5.6.90.0150.03517.51
5.6.80.0100.03817.16
5.6.70.0100.00314.17
5.6.60.0030.00614.12
5.6.50.0040.00813.95
5.6.40.0080.00614.08
5.6.30.0030.01014.12
5.6.20.0000.01414.13
5.6.10.0070.00714.31
5.6.00.0070.00414.15
5.5.380.0030.00610.97
5.5.370.0060.00611.14
5.5.360.0000.00810.98
5.5.350.0130.01815.69
5.5.340.0060.03014.44
5.5.330.0070.04215.72
5.5.320.0190.03115.66
5.5.310.0170.03515.74
5.5.300.0050.02514.46
5.5.290.0080.04414.54
5.5.280.0080.03915.93
5.5.270.0080.04015.90
5.5.260.0050.04016.00
5.5.250.0160.02615.70
5.5.240.0130.03215.63
5.5.230.0030.00310.90
5.5.220.0070.00411.14
5.5.210.0050.00311.04
5.5.200.0000.00910.90
5.5.190.0000.00911.21
5.5.180.0080.00411.20
5.5.170.0000.00811.21
5.5.160.0000.01111.23
5.5.150.0030.00610.90
5.5.140.0040.00410.90
5.5.130.0040.00411.20
5.5.120.0040.00411.18
5.5.110.0080.00010.90
5.5.100.0000.00510.90
5.5.90.0080.00311.14
5.5.80.0060.00310.90
5.5.70.0070.00711.20
5.5.60.0030.00611.02
5.5.50.0000.01110.90
5.5.40.0030.00910.90
5.5.30.0000.00510.90
5.5.20.0030.00311.09
5.5.10.0070.00310.90
5.5.00.0060.00610.90
5.4.450.0440.02815.05
5.4.440.0360.03315.30
5.4.430.0500.02915.32
5.4.420.0350.00415.29
5.4.410.0370.00015.35
5.4.400.0360.00115.01
5.4.390.0370.00015.06
5.4.380.0380.00315.03
5.4.370.0430.00414.94
5.4.360.0380.00215.03
5.4.350.0370.00315.07
5.4.340.0060.01711.61
5.4.330.0040.00710.90
5.4.320.0040.02311.75
5.4.310.0070.02211.70
5.4.300.0020.02311.71
5.4.290.0040.02411.73
5.4.280.0050.02011.74
5.4.270.0050.02111.70
5.4.260.0040.02311.80
5.4.250.0060.02211.65
5.4.240.0050.02111.67
5.4.230.0070.02111.79
5.4.220.0090.02211.72
5.4.210.0050.02111.64
5.4.200.0040.03011.67
5.4.190.0070.02211.64
5.4.180.0040.02311.64
5.4.170.0040.02411.71
5.4.160.0060.02411.64
5.4.150.0050.02611.64
5.4.140.0060.02111.48
5.4.130.0070.02111.56
5.4.120.0070.02311.60
5.4.110.0070.02111.58
5.4.100.0040.02411.46
5.4.90.0080.01811.46
5.4.80.0050.02211.53
5.4.70.0090.02311.45
5.4.60.0050.02211.56
5.4.50.0060.01911.56
5.4.40.0070.02011.51
5.4.30.0070.02111.56
5.4.20.0050.02011.45
5.4.10.0080.01811.51
5.4.00.0050.01911.19
5.3.290.0030.02611.85
5.3.280.0050.02111.80
5.3.270.0020.02411.81
5.3.260.0070.02211.81
5.3.250.0070.02011.81
5.3.240.0060.02011.81
5.3.230.0090.01911.80
5.3.220.0040.02411.79
5.3.210.0020.02411.79
5.3.200.0020.02411.79
5.3.190.0070.02311.79
5.3.180.0040.02211.79
5.3.170.0040.02611.78
5.3.160.0040.02711.79
5.3.150.0070.02111.79
5.3.140.0060.02111.78
5.3.130.0020.02411.78
5.3.120.0040.02911.78
5.3.110.0050.02511.78
5.3.100.0060.02511.51
5.3.90.0020.02111.50
5.3.80.0080.02211.50
5.3.70.0100.02011.49
5.3.60.0050.02311.49
5.3.50.0060.02211.46
5.3.40.0030.02311.46
5.3.30.0040.02311.44
5.3.20.0040.02111.33
5.3.10.0050.02211.31
5.3.00.0080.01911.31
5.2.170.0070.01610.04
5.2.160.0030.01910.04
5.2.150.0040.01710.04
5.2.140.0040.01910.04
5.2.130.0020.01710.02
5.2.120.0060.01410.02
5.2.110.0060.01510.02
5.2.100.0060.01910.02
5.2.90.0030.01710.02
5.2.80.0050.01910.02
5.2.70.0020.02010.02
5.2.60.0050.01910.00
5.2.50.0040.0189.98
5.2.40.0040.0179.97
5.2.30.0020.0199.96
5.2.20.0060.0169.96
5.2.10.0050.0169.91
5.2.00.0050.0189.84
5.1.60.0040.0149.49
5.1.50.0020.0199.49
5.1.40.0060.0149.47
5.1.30.0050.0189.65
5.1.20.0050.0139.66
5.1.10.0050.0149.52
5.1.00.0050.0139.53
5.0.50.0050.0118.76
5.0.40.0020.0138.69
5.0.30.0040.0188.60
5.0.20.0060.0108.58
5.0.10.0010.0148.57
5.0.00.0040.0178.57
4.4.90.0020.0127.84
4.4.80.0030.0127.83
4.4.70.0030.0107.83
4.4.60.0050.0077.83
4.4.50.0040.0087.83
4.4.40.0060.0157.80
4.4.30.0050.0077.83
4.4.20.0010.0127.87
4.4.10.0010.0117.87
4.4.00.0030.0127.83
4.3.110.0050.0077.78
4.3.100.0010.0127.78
4.3.90.0030.0097.77
4.3.80.0030.0137.74
4.3.70.0030.0077.77
4.3.60.0020.0097.76
4.3.50.0030.0097.76
4.3.40.0020.0167.72
4.3.30.0040.0077.09
4.3.20.0020.0117.08
4.3.10.0010.0117.06
4.3.00.0070.0159.06

preferences:
41.35 ms | 401 KiB | 5 Q