3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array("test"=>"1", "test2"=>2, "test3"=>3); $needed = array("test", "test2"); $a = array_filter(array($a, $needed), function ($item, $needed) { return in_array($item, $needed); });

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.0110.00716.88
8.3.50.0110.01118.04
8.3.40.0040.01118.79
8.3.30.0070.01018.89
8.3.20.0060.00320.12
8.3.10.0040.00423.33
8.3.00.0080.00023.65
8.2.180.0110.00418.54
8.2.170.0070.00719.09
8.2.160.0070.00722.96
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0080.00019.91
8.2.110.0140.00722.26
8.2.100.0070.00418.05
8.2.90.0000.00819.36
8.2.80.0000.00917.97
8.2.70.0000.00817.63
8.2.60.0060.00317.93
8.2.50.0060.00318.07
8.2.40.0030.00622.15
8.2.30.0050.00520.51
8.2.20.0000.00717.65
8.2.10.0040.00418.17
8.2.00.0000.00718.10
8.1.280.0060.00825.92
8.1.270.0170.00320.33
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0060.00322.53
8.1.230.0070.00419.14
8.1.220.0000.00817.74
8.1.210.0030.00618.77
8.1.200.0040.00417.25
8.1.190.0040.00417.25
8.1.180.0040.00418.10
8.1.170.0060.00318.65
8.1.160.0040.00420.84
8.1.150.0040.00418.88
8.1.140.0030.00619.50
8.1.130.0000.00717.65
8.1.120.0000.00717.50
8.1.110.0050.00317.52
8.1.100.0040.00417.39
8.1.90.0050.00217.46
8.1.80.0000.00817.48
8.1.70.0070.00017.52
8.1.60.0080.00017.58
8.1.50.0000.00817.35
8.1.40.0030.00617.53
8.1.30.0030.00517.63
8.1.20.0080.00017.54
8.1.10.0040.00417.48
8.1.00.0040.00417.53
8.0.300.0030.00518.77
8.0.290.0040.00416.75
8.0.280.0040.00418.48
8.0.270.0030.00317.25
8.0.260.0030.00317.16
8.0.250.0000.00717.04
8.0.240.0070.00016.91
8.0.230.0000.00717.07
8.0.220.0030.00516.98
8.0.210.0000.00716.91
8.0.200.0030.00317.07
8.0.190.0000.00816.88
8.0.180.0000.00716.96
8.0.170.0070.00017.02
8.0.160.0070.00017.00
8.0.150.0030.00316.74
8.0.140.0040.00416.79
8.0.130.0000.00613.28
8.0.120.0040.00416.79
8.0.110.0000.00716.82
8.0.100.0040.00416.94
8.0.90.0000.00816.79
8.0.80.0100.01016.99
8.0.70.0000.00716.80
8.0.60.0000.00816.91
8.0.50.0080.00017.01
8.0.30.0090.00716.98
8.0.20.0110.01117.40
8.0.10.0030.00517.19
8.0.00.0100.00816.77
7.4.330.0000.00516.73
7.4.320.0030.00316.41
7.4.300.0030.00316.65
7.4.290.0030.00316.61
7.4.280.0030.00516.57
7.4.270.0060.00016.36
7.4.260.0040.00316.61
7.4.250.0040.00416.52
7.4.240.0000.00716.48
7.4.230.0040.00416.42
7.4.220.0030.01216.43
7.4.210.0000.01416.60
7.4.200.0000.00716.55
7.4.160.0060.00916.52
7.4.150.0060.01317.40
7.4.140.0140.00417.86
7.4.130.0120.00916.56
7.4.120.0140.00316.63
7.4.110.0100.00716.35
7.4.100.0090.00916.25
7.4.90.0080.00916.54
7.4.80.0090.00919.39
7.4.70.0070.01016.57
7.4.60.0000.01716.54
7.4.50.0070.00716.65
7.4.40.0160.00316.45
7.4.30.0070.01016.69
7.4.10.0130.00514.86
7.4.00.0070.00914.87
7.3.330.0000.00613.36
7.3.320.0030.00213.35
7.3.310.0000.00716.21
7.3.300.0030.00316.22
7.3.290.0110.00416.31
7.3.280.0060.00816.34
7.3.270.0110.00717.40
7.3.260.0120.00416.51
7.3.250.0120.00616.41
7.3.240.0050.01416.44
7.3.230.0130.00616.42
7.3.210.0100.01316.46
7.3.200.0060.01016.50
7.3.190.0140.00316.53
7.3.180.0090.00616.61
7.3.170.0150.00416.54
7.3.160.0070.00716.48
7.3.130.0050.01414.62
7.3.120.0070.01114.76
7.3.110.0080.01014.78
7.3.100.0080.00814.72
7.3.90.0070.00814.69
7.3.80.0070.00714.71
7.3.70.0110.00414.84
7.3.60.0080.00814.81
7.3.50.0050.01014.64
7.3.40.0080.00514.75
7.3.30.0090.00614.85
7.3.20.0030.01016.80
7.3.10.0050.00916.61
7.3.00.0090.00416.56
7.2.330.0140.00416.60
7.2.320.0130.01216.60
7.2.310.0150.00916.57
7.2.300.0030.01616.64
7.2.290.0130.00316.57
7.2.260.0060.01214.91
7.2.250.0080.01015.02
7.2.240.0060.00815.12
7.2.230.0070.01014.96
7.2.220.0060.00815.04
7.2.210.0020.01314.95
7.2.200.0080.00815.03
7.2.190.0100.00615.05
7.2.180.0040.01315.00
7.2.170.0060.00914.87
7.2.160.0060.00814.83
7.2.150.0060.01116.79
7.2.140.0070.00616.73
7.2.130.0040.00816.79
7.2.120.0050.00916.86
7.2.110.0070.00716.69
7.2.100.0050.00816.83
7.2.90.0050.00616.80
7.2.80.0030.00916.77
7.2.70.0030.00916.88
7.2.60.0070.00716.75
7.2.50.0050.00616.67
7.2.40.0040.01116.85
7.2.30.0070.00816.84
7.2.20.0090.00816.85
7.2.10.0060.01016.72
7.2.00.0060.00817.48
7.1.330.0060.00915.81
7.1.320.0020.01215.60
7.1.310.0030.01015.58
7.1.300.0060.00915.66
7.1.290.0070.00815.47
7.1.280.0090.00415.64
7.1.270.0050.00915.57
7.1.260.0020.00815.58
7.1.250.0080.00315.69
7.1.240.0030.01115.73
7.1.230.0070.00615.70
7.1.220.0040.00415.65
7.1.210.0080.00715.56
7.1.200.0040.00715.63
7.1.190.0080.00315.59
7.1.180.0050.00615.83
7.1.170.0050.01015.59
7.1.160.0070.00615.71
7.1.150.0060.00815.76
7.1.140.0050.00815.62
7.1.130.0050.00415.59
7.1.120.0050.00915.78
7.1.110.0020.01115.67
7.1.100.0030.00916.32
7.1.90.0030.01015.65
7.1.80.0070.00515.70
7.1.70.0030.00916.11
7.1.60.0070.01016.88
7.1.50.0060.01115.97
7.1.40.0060.00815.67
7.1.30.0000.01015.65
7.1.20.0070.00715.50
7.1.10.0040.00515.79
7.1.00.0070.02717.91
7.0.330.0050.01015.26
7.0.320.0020.01115.50
7.0.310.0060.00715.45
7.0.300.0080.00715.31
7.0.290.0080.00415.44
7.0.280.0050.00615.26
7.0.270.0070.00715.38
7.0.260.0030.00715.44
7.0.250.0060.00715.40
7.0.240.0050.00815.42
7.0.230.0030.00615.32
7.0.220.0050.00715.54
7.0.210.0060.00715.39
7.0.200.0030.00715.81
7.0.190.0070.00515.54
7.0.180.0040.00615.40
7.0.170.0060.00615.38
7.0.160.0060.00815.43
7.0.150.0040.00815.34
7.0.140.0050.00815.39
7.0.130.0040.00915.31
7.0.120.0030.00715.51
7.0.110.0020.00915.33
7.0.100.0060.00815.39
7.0.90.0020.01315.54
7.0.80.0060.00615.26
7.0.70.0050.01015.39
7.0.60.0090.02816.95
7.0.50.0060.03116.25
7.0.40.0070.01815.60
7.0.30.0100.01915.69
7.0.20.0060.03015.71
7.0.10.0040.03315.71
7.0.00.0040.03515.75
5.6.400.0030.01014.22
5.6.390.0090.00814.33
5.6.380.0050.00714.35
5.6.370.0070.00714.03
5.6.360.0070.00814.22
5.6.350.0020.01414.36
5.6.340.0040.01014.30
5.6.330.0040.00614.33
5.6.320.0050.01114.41
5.6.310.0050.00714.07
5.6.300.0050.00714.52
5.6.290.0060.00514.22
5.6.280.0070.01316.63
5.6.270.0010.00914.36
5.6.260.0070.00514.32
5.6.250.0090.00514.23
5.6.240.0110.00514.07
5.6.230.0060.00514.13
5.6.220.0050.00814.10
5.6.210.0070.02116.26
5.6.200.0090.02715.59
5.6.190.0040.02916.35
5.6.180.0120.02816.29
5.6.170.0130.02616.20
5.6.160.0080.02616.33
5.6.150.0070.02015.47
5.6.140.0060.01615.50
5.6.130.0040.03315.47
5.6.120.0070.02116.47
5.6.110.0060.03316.47
5.6.100.0040.02516.36
5.6.90.0070.03216.57
5.6.80.0070.03116.20
5.6.70.0050.00914.13
5.6.60.0070.00714.29
5.6.50.0060.00714.24
5.6.40.0020.01414.26
5.6.30.0030.01013.98
5.6.20.0060.00614.13
5.6.10.0070.00714.13
5.6.00.0030.01014.09
5.5.380.0050.00614.16
5.5.370.0040.00714.16
5.5.360.0070.00714.21
5.5.350.0160.02816.10
5.5.340.0060.03115.56
5.5.330.0060.02116.16
5.5.320.0120.03116.13
5.5.310.0140.03016.24
5.5.300.0040.02815.49
5.5.290.0050.03415.36
5.5.280.0100.02616.39
5.5.270.0080.03316.49
5.5.260.0100.03216.29
5.5.250.0110.02716.22
5.5.240.0070.01416.14
5.5.230.0050.00714.25
5.5.220.0050.00814.04
5.5.210.0040.00414.14
5.5.200.0070.00514.05
5.5.190.0050.00714.06
5.5.180.0060.00614.04
5.5.170.0060.00614.09
5.5.160.0050.01014.14
5.5.150.0050.00714.12
5.5.140.0060.00814.21
5.5.130.0060.00813.96
5.5.120.0080.00814.18
5.5.110.0070.00714.16
5.5.100.0030.00914.17
5.5.90.0080.00613.98
5.5.80.0040.00913.98
5.5.70.0030.00914.02
5.5.60.0050.00913.88
5.5.50.0000.01014.21
5.5.40.0020.01214.11
5.5.30.0020.01214.25
5.5.20.0070.00713.96
5.5.10.0030.01214.27
5.5.00.0030.00914.04

preferences:
61.61 ms | 400 KiB | 5 Q