3v4l.org

run code in 300+ PHP versions simultaneously
<?php function anyKeyExists($haystack, $needles) { foreach ($needles as $needle) { if (isset($haystack[$needle])) { return true; } } return false; } $array = [ "keyA" => 1, "keyB" => 2, "keyC" => 3 ]; echo "noMatch: " , (int)anyKeyExists($array, ['keyD', 'keyF']) , "\n"; echo "oneMatch: " , anyKeyExists($array, ['keyB', 'keyD']) , "\n"; echo "twoMatches: " , anyKeyExists($array, ['keyA', 'keyC']) , "\n";

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.4.120.0130.00624.27
8.4.110.0110.00919.75
8.4.100.0110.00917.70
8.4.90.0130.00720.55
8.4.80.0110.00519.14
8.4.70.0120.00719.12
8.4.60.0070.01218.89
8.4.50.0100.01018.91
8.4.40.0160.00019.64
8.4.30.0090.01320.34
8.4.20.0140.00618.51
8.4.10.0030.00617.64
8.3.250.0080.01118.84
8.3.240.0110.00817.02
8.3.230.0100.00916.72
8.3.220.0040.00419.23
8.3.210.0090.00918.66
8.3.200.0070.00416.42
8.3.190.0100.00917.17
8.3.180.0120.00618.92
8.3.170.0000.00818.88
8.3.160.0030.00620.05
8.3.150.0060.01316.51
8.3.140.0050.00318.60
8.3.130.0060.00318.25
8.3.120.0110.00718.94
8.3.110.0100.01020.94
8.3.100.0150.00416.50
8.3.90.0040.00418.71
8.3.80.0060.00317.97
8.3.70.0120.00316.38
8.3.60.0110.00418.55
8.3.50.0090.00921.96
8.3.40.0170.00318.67
8.3.30.0140.00718.53
8.3.20.0040.00421.69
8.3.10.0070.00020.16
8.3.00.0090.00023.66
8.2.290.0130.00616.48
8.2.280.0110.00720.71
8.2.270.0130.00619.10
8.2.260.0040.01516.33
8.2.250.0050.00316.48
8.2.240.0030.00619.01
8.2.230.0050.00522.58
8.2.220.0040.00424.06
8.2.210.0070.00026.77
8.2.200.0090.00316.63
8.2.190.0140.00016.63
8.2.180.0140.00418.54
8.2.170.0120.00322.96
8.2.160.0030.01021.10
8.2.150.0050.00524.18
8.2.140.0030.00524.66
8.2.130.0030.00626.16
8.2.120.0120.00326.16
8.2.110.0070.00322.13
8.2.100.0070.00417.72
8.2.90.0050.00317.73
8.2.80.0060.00317.97
8.2.70.0040.00418.04
8.2.60.0040.00418.16
8.2.50.0000.00818.10
8.2.40.0030.00619.30
8.2.30.0070.00019.36
8.2.20.0070.00018.06
8.2.10.0000.00719.25
8.2.00.0070.00019.23
8.1.330.0090.01116.23
8.1.320.0060.01317.94
8.1.310.0080.00818.43
8.1.300.0160.00419.48
8.1.290.0060.00318.88
8.1.280.0150.00025.92
8.1.270.0040.00422.14
8.1.260.0040.00426.35
8.1.250.0060.00328.09
8.1.240.0040.00422.54
8.1.230.0080.00322.67
8.1.220.0080.00017.74
8.1.210.0000.00818.77
8.1.200.0000.01017.35
8.1.190.0030.00517.23
8.1.180.0060.00318.10
8.1.170.0000.00818.64
8.1.160.0000.00718.82
8.1.150.0000.00718.77
8.1.140.0030.00322.19
8.1.130.0000.00720.09
8.1.120.0040.00417.36
8.1.110.0050.00317.34
8.1.100.0000.00717.48
8.1.90.0000.00717.43
8.1.80.0070.00017.46
8.1.70.0000.00817.50
8.1.60.0080.00017.60
8.1.50.0000.00817.57
8.1.40.0080.00017.48
8.1.30.0000.00917.66
8.1.20.0050.00317.57
8.1.10.0000.00717.59
8.1.00.0110.00017.50
8.0.300.0050.00221.95
8.0.290.0050.00216.75
8.0.280.0030.00318.45
8.0.270.0040.00416.82
8.0.260.0030.00720.05
8.0.250.0030.00316.94
8.0.240.0070.00016.92
8.0.230.0000.00716.93
8.0.220.0000.00716.89
8.0.210.0000.00716.96
8.0.200.0080.00016.91
8.0.190.0030.00616.79
8.0.180.0000.00816.77
8.0.170.0050.00316.92
8.0.160.0000.00816.84
8.0.150.0000.00816.72
8.0.140.0040.00416.81
8.0.130.0000.00613.28
8.0.120.0040.00416.89
8.0.110.0050.00216.92
8.0.100.0030.00516.67
8.0.90.0000.00816.88
8.0.80.0090.00616.87
8.0.70.0040.00416.69
8.0.60.0050.00216.83
8.0.50.0030.00516.96
8.0.30.0110.00616.97
8.0.20.0080.01117.10
8.0.10.0060.00317.02
8.0.00.0150.00916.67
7.4.330.0030.00315.55
7.4.320.0070.00016.43
7.4.300.0050.00216.52
7.4.290.0000.00716.61
7.4.280.0030.00616.41
7.4.270.0020.00516.50
7.4.260.0050.00516.39
7.4.250.0000.00716.59
7.4.240.0040.00416.51
7.4.230.0000.00816.61
7.4.220.0020.00516.63
7.4.210.0110.00816.56
7.4.200.0040.00416.53
7.4.140.0150.00317.86
7.4.130.0070.01016.41
7.4.120.0060.01016.71
7.4.110.0160.00316.35
7.4.100.0090.00916.63
7.4.90.0130.00316.34
7.4.80.0110.00719.39
7.4.70.0130.00316.53
7.4.60.0070.01016.61
7.4.50.0120.00316.37
7.4.40.0090.01316.59
7.4.00.0080.00614.77
7.3.330.0030.00313.33
7.3.320.0000.00613.25
7.3.310.0000.00716.32
7.3.300.0060.00016.32
7.3.290.0070.00016.22
7.3.280.0080.00816.27
7.3.260.0090.00916.49
7.3.240.0090.01016.43
7.3.230.0100.00716.46
7.3.210.0090.01216.44
7.3.200.0070.01016.21
7.3.190.0090.00916.34
7.3.180.0100.00616.29
7.3.170.0100.01316.48
7.3.160.0090.00616.37
7.3.120.0040.01115.03
7.3.110.0070.01014.87
7.3.100.0130.00614.80
7.3.90.0040.00814.85
7.3.80.0000.01414.97
7.3.70.0060.00814.75
7.3.60.0050.00814.79
7.3.50.0070.00714.76
7.3.40.0120.00514.94
7.3.30.0050.00714.57
7.3.20.0080.00416.58
7.3.10.0090.00616.64
7.3.00.0080.00516.78
7.2.330.0120.00916.30
7.2.320.0110.00616.68
7.2.310.0060.01116.38
7.2.300.0090.00916.43
7.2.290.0080.00816.79
7.2.250.0100.01014.87
7.2.240.0060.00914.91
7.2.230.0060.00915.09
7.2.220.0070.00715.14
7.2.210.0110.00414.88
7.2.200.0030.01315.07
7.2.190.0050.01014.93
7.2.180.0070.00814.89
7.2.170.0080.00814.89
7.2.160.0150.00315.00
7.2.150.0060.00916.64
7.2.140.0070.01016.89
7.2.130.0080.00816.68
7.2.120.0070.01116.95
7.2.110.0060.00616.85
7.2.100.0060.00616.81
7.2.90.0120.00316.77
7.2.80.0120.00016.71
7.2.70.0070.00716.71
7.2.60.0070.00716.78
7.2.50.0080.00616.86
7.2.40.0090.00617.02
7.2.30.0070.00716.73
7.2.20.0070.00717.08
7.2.10.0090.00616.90
7.2.00.0110.00316.82
7.1.330.0070.00715.53
7.1.320.0000.01115.59
7.1.310.0070.01015.46
7.1.300.0050.01015.83
7.1.290.0080.00815.65
7.1.280.0020.00915.73
7.1.270.0050.00515.64
7.1.260.0120.00515.73
7.1.250.0090.00615.50

preferences:
119.36 ms | 403 KiB | 5 Q