3v4l.org

run code in 300+ PHP versions simultaneously
<?php $config = ["a" => "green", "b" => "red", "d" => "blue"]; $allow = ["a","b","c"]; $result = \array_filter($config, function ($item) use ($allow) { return \in_array($item, $allow, true); }, \ARRAY_FILTER_USE_KEY); print_r($result);

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.0080.00818.06
8.3.50.0110.00418.14
8.3.40.0130.00618.64
8.3.30.0150.00318.72
8.3.20.0070.00021.86
8.3.10.0080.00023.48
8.3.00.0080.00023.48
8.2.180.0130.00716.50
8.2.170.0090.00618.67
8.2.160.0140.00022.96
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0040.00421.11
8.2.120.0120.00326.35
8.2.110.0030.01420.40
8.2.100.0060.00617.72
8.2.90.0040.00420.59
8.2.80.0030.00519.66
8.2.70.0050.00318.04
8.2.60.0000.00917.80
8.2.50.0070.00018.10
8.2.40.0000.00919.17
8.2.30.0070.00019.21
8.2.20.0040.00417.92
8.2.10.0000.00717.99
8.2.00.0000.00918.04
8.1.280.0070.00725.92
8.1.270.0040.00423.91
8.1.260.0050.00326.35
8.1.250.0090.00028.09
8.1.240.0200.00323.77
8.1.230.0070.00420.97
8.1.220.0040.00417.78
8.1.210.0060.00319.23
8.1.200.0030.00617.23
8.1.190.0000.00817.36
8.1.180.0030.00618.10
8.1.170.0030.00618.56
8.1.160.0030.00618.89
8.1.150.0000.00718.97
8.1.140.0030.00317.70
8.1.130.0040.00419.05
8.1.120.0000.00717.36
8.1.110.0000.00717.47
8.1.100.0050.00317.46
8.1.90.0000.00917.35
8.1.80.0000.00717.49
8.1.70.0030.00317.43
8.1.60.0000.00817.60
8.1.50.0040.00417.40
8.1.40.0080.00017.54
8.1.30.0060.00717.57
8.1.20.0000.00717.60
8.1.10.0050.00217.51
8.1.00.0000.00817.43
8.0.300.0040.00419.94
8.0.290.0030.00716.75
8.0.280.0070.00018.44
8.0.270.0030.00317.17
8.0.260.0000.00617.30
8.0.250.0000.00716.96
8.0.240.0030.00316.86
8.0.230.0000.00716.94
8.0.220.0040.00416.88
8.0.210.0030.00316.80
8.0.200.0060.00016.98
8.0.190.0000.00816.94
8.0.180.0030.00316.93
8.0.170.0000.00916.95
8.0.160.0040.00416.92
8.0.150.0070.00016.74
8.0.140.0040.00416.89
8.0.130.0030.00313.28
8.0.120.0030.00516.87
8.0.110.0080.00016.72
8.0.100.0000.00716.71
8.0.90.0050.00216.91
8.0.80.0110.00316.88
8.0.70.0070.00016.91
8.0.60.0000.00816.95
8.0.50.0050.00316.83
8.0.30.0110.00817.08
8.0.20.0050.01417.40
8.0.10.0030.00317.03
8.0.00.0100.00816.91
7.4.330.0050.00015.55
7.4.320.0070.00016.61
7.4.300.0030.00316.46
7.4.290.0000.00716.51
7.4.280.0050.00316.48
7.4.270.0030.00316.61
7.4.260.0080.00316.56
7.4.250.0000.00716.46
7.4.240.0040.00416.61
7.4.230.0030.00316.49
7.4.220.0030.00516.39
7.4.210.0070.01316.59
7.4.200.0050.00216.45
7.4.160.0060.01016.47
7.4.140.0150.00917.86
7.4.130.0070.01116.61
7.4.120.0080.01116.45
7.4.110.0060.01516.63
7.4.100.0180.00316.59
7.4.90.0090.00916.55
7.4.80.0170.00319.39
7.4.70.0100.00716.42
7.4.60.0140.00316.54
7.4.50.0140.00316.55
7.4.40.0100.01016.53
7.4.00.0040.01314.95
7.3.330.0000.00513.23
7.3.320.0000.00513.13
7.3.310.0070.00016.34
7.3.300.0040.00416.16
7.3.290.0030.00316.22
7.3.280.0040.01416.29
7.3.260.0070.01016.24
7.3.240.0120.00716.35
7.3.230.0040.01216.26
7.3.210.0000.01716.29
7.3.200.0160.00016.37
7.3.190.0040.01216.25
7.3.180.0060.00916.61
7.3.170.0080.00816.40
7.3.160.0000.01516.49
7.3.120.0080.01114.72
7.3.110.0090.00915.08
7.3.100.0080.00514.80
7.3.90.0040.01215.02
7.3.80.0060.00614.44
7.3.70.0070.01014.79
7.3.60.0030.00814.79
7.3.50.0060.01014.81
7.3.40.0060.00614.79
7.3.30.0040.01114.80
7.3.20.0060.00616.63
7.3.10.0000.01016.76
7.3.00.0120.00416.52
7.2.330.0120.00616.63
7.2.320.0090.01516.70
7.2.310.0070.01716.67
7.2.300.0130.00316.57
7.2.290.0120.00616.68
7.2.250.0040.01415.08
7.2.240.0100.01014.95
7.2.230.0030.00714.66
7.2.220.0070.01014.81
7.2.210.0070.00414.95
7.2.200.0080.00415.07
7.2.190.0030.00815.10
7.2.180.0040.01114.72
7.2.170.0100.00714.89
7.2.60.0100.00716.39
7.2.50.0100.00716.67
7.2.40.0760.01317.89
7.2.30.1030.00918.17
7.2.20.0960.01417.76
7.2.10.0820.01118.04
7.2.00.0840.00717.71
7.1.330.0030.01415.68
7.1.320.0070.00715.63
7.1.310.0060.00616.12
7.1.300.0120.00015.83
7.1.290.0030.01015.95
7.1.280.0030.01015.86
7.1.270.0060.00615.82
7.1.260.0110.00415.71
7.1.200.0070.00715.51
7.1.160.0790.01116.81
7.1.150.0870.00816.71
7.1.140.0860.00716.78
7.1.130.0980.01116.78
7.1.120.0770.00916.39
7.1.110.0820.00916.19
7.1.100.0780.01116.29
7.1.90.0880.01116.14
7.1.80.0810.00916.46
7.1.70.1710.00815.12
7.1.60.0990.01433.25
7.1.50.1140.01432.98
7.1.40.0980.01332.50
7.1.30.0850.01332.84
7.1.20.0970.01432.53
7.1.10.0710.00914.93
7.1.00.1000.01214.98

preferences:
64.07 ms | 401 KiB | 5 Q