3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); $incomingArray = [ 'foo' => 'abc', 'bar' => null, 'candy' => 1, 'foobar' => true, 'barfoo' => false, ]; $myKeyCheck = ['foo', 'bar', 'candy', 'foobar', 'barfoo']; $iterator = function($a, $b) { return $a === null; }; $filter = function($a) { return $a !== null; }; \var_dump(\array_filter(\array_uintersect($incomingArray, \array_flip($myKeyCheck), $iterator), $filter));

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.30
8.3.50.0070.00716.13
8.3.40.0040.01118.90
8.3.30.0070.00718.42
8.3.20.0040.00420.31
8.3.10.0060.00320.91
8.3.00.0080.00020.80
8.2.180.0060.01217.00
8.2.170.0070.00722.96
8.2.160.0110.00318.92
8.2.150.0070.00024.18
8.2.140.0040.00424.66
8.2.130.0070.00019.27
8.2.120.0000.00726.35
8.2.110.0070.00322.28
8.2.100.0080.00317.84
8.2.90.0060.00317.91
8.2.80.0000.00819.39
8.2.70.0030.00617.63
8.2.60.0080.00018.03
8.2.50.0000.00818.10
8.2.40.0000.00820.59
8.2.30.0040.00419.26
8.2.20.0000.00717.94
8.2.10.0040.00418.00
8.2.00.0000.00718.11
8.1.280.0090.00625.92
8.1.270.0050.00222.08
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0030.00623.97
8.1.230.0090.00322.64
8.1.220.0030.00517.90
8.1.210.0030.00518.95
8.1.200.0060.00317.35
8.1.190.0080.00019.00
8.1.180.0040.00418.10
8.1.170.0060.00318.63
8.1.160.0040.00419.01
8.1.150.0040.00418.89
8.1.140.0040.00419.59
8.1.130.0000.00718.95
8.1.120.0030.00617.44
8.1.110.0050.00217.45
8.1.100.0030.00517.34
8.1.90.0070.00017.37
8.1.80.0000.00717.36
8.1.70.0000.00717.47
8.1.60.0090.00017.47
8.1.50.0000.00817.50
8.1.40.0080.00017.54
8.1.30.0050.00317.59
8.1.20.0080.00417.58
8.1.10.0040.00417.36
8.1.00.0050.00217.46
8.0.300.0040.00419.87
8.0.290.0030.00716.75
8.0.280.0030.00318.38
8.0.270.0000.00717.13
8.0.260.0060.00018.82
8.0.250.0070.00016.90
8.0.240.0060.00316.93
8.0.230.0000.00716.98
8.0.220.0040.00316.89
8.0.210.0000.00716.80
8.0.200.0000.00716.93
8.0.190.0040.00417.04
8.0.180.0020.00517.05
8.0.170.0000.00817.03
8.0.160.0070.00016.84
8.0.150.0040.00416.95
8.0.140.0050.00216.95
8.0.130.0000.00613.34
8.0.120.0040.00416.96
8.0.110.0040.00416.82
8.0.100.0040.00416.90
8.0.90.0080.00017.07
8.0.80.0150.00016.88
8.0.70.0040.00416.77
8.0.60.0050.00316.83
8.0.50.0040.00416.84
8.0.30.0150.00417.17
8.0.20.0110.00917.40
8.0.10.0070.00017.14
8.0.00.0070.01316.80
7.4.330.0050.00015.55
7.4.320.0060.00016.42
7.4.300.0000.00616.52
7.4.290.0050.00316.48
7.4.280.0030.00516.64
7.4.270.0070.00016.60
7.4.260.0030.00316.39
7.4.250.0030.00316.39
7.4.240.0000.00716.63
7.4.230.0030.00316.60
7.4.220.0000.00816.62
7.4.210.0040.01116.45
7.4.200.0030.00316.61
7.4.160.0030.01316.38
7.4.150.0120.01217.40
7.4.140.0130.00617.86
7.4.130.0160.00816.59
7.4.120.0150.00616.50
7.4.110.0050.01016.54
7.4.100.0090.00816.45
7.4.90.0120.00616.59
7.4.80.0090.01319.39
7.4.70.0120.00616.43
7.4.60.0060.01516.50
7.4.50.0040.01416.56
7.4.40.0060.01516.62
7.4.30.0100.01016.45
7.4.00.0030.01414.84
7.3.330.0000.00613.30
7.3.320.0070.00013.12
7.3.310.0000.00716.27
7.3.300.0000.00716.27
7.3.290.0070.00916.31
7.3.280.0060.01016.28
7.3.270.0140.00717.40
7.3.260.0130.00316.44
7.3.250.0100.01016.41
7.3.240.0120.00716.29
7.3.230.0070.01116.41
7.3.210.0100.00716.35
7.3.200.0080.00916.64
7.3.190.0180.00316.58
7.3.180.0060.01016.36
7.3.170.0110.01116.31
7.3.160.0120.00416.66
7.2.330.0140.00316.28
7.2.320.0100.01416.63
7.2.310.0100.00616.66
7.2.300.0070.01016.55
7.2.290.0150.00816.64
7.2.60.0060.00916.86
7.1.200.0090.00315.83
7.1.80.6590.01016.05
7.1.70.6240.01215.05
7.1.60.7170.00833.28
7.1.50.7880.02632.96
7.1.40.6860.01732.63
7.1.30.8130.01632.76
7.1.20.6190.01332.95
7.1.10.5950.00314.72
7.1.00.5640.01314.86
7.0.200.6890.00614.82
7.0.190.9920.01814.96
7.0.180.6700.00814.50
7.0.170.8610.01614.28
7.0.160.6810.01414.25
7.0.150.5930.00914.24
7.0.140.5800.01314.32
7.0.130.4910.01414.68
7.0.120.4570.01114.82
7.0.110.5240.01414.34
7.0.100.4970.01014.37
7.0.90.4850.02014.29
7.0.80.4430.00914.34
7.0.70.4520.01614.52
7.0.60.4580.01214.32
7.0.50.4020.00914.39
7.0.40.4200.01314.77
7.0.30.4070.01314.77
7.0.20.4210.00914.59
7.0.10.4330.00914.66
7.0.00.4170.01114.70

preferences:
58.65 ms | 401 KiB | 5 Q