3v4l.org

run code in 300+ PHP versions simultaneously
<?php //The values in this arrays contains the names of the indexes (keys) that should exist in the data array $required = array('key1', 'key2', 'key3' ); $data = array( 'key1' => 10, 'key2' => 20, 'key3' => 30, 'key4' => 40 ); if(count(array_intersect_key(array_flip($required), $data)) === count($required)) { echo "all exist"; }

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.0170.00016.36
8.3.50.0040.01118.20
8.3.40.0140.00018.89
8.3.30.0140.00018.91
8.3.20.0040.01120.16
8.3.10.0000.00821.86
8.3.00.0060.00319.38
8.2.180.0120.00318.18
8.2.170.0070.00722.96
8.2.160.0080.00620.47
8.2.150.0050.00224.18
8.2.140.0040.00424.66
8.2.130.0110.00326.16
8.2.120.0050.00319.23
8.2.110.0000.01021.00
8.2.100.0100.00317.63
8.2.90.0040.00419.23
8.2.80.0060.00317.97
8.2.70.0030.00517.63
8.2.60.0000.00817.80
8.2.50.0050.00318.07
8.2.40.0040.00418.03
8.2.30.0080.00018.05
8.2.20.0050.00317.73
8.2.10.0040.00418.11
8.2.00.0000.00817.65
8.1.280.0110.00425.92
8.1.270.0000.00820.70
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0000.00823.92
8.1.230.0120.00018.91
8.1.220.0040.00417.78
8.1.210.0000.00818.77
8.1.200.0030.00617.23
8.1.190.0060.00317.34
8.1.180.0060.00318.10
8.1.170.0060.00318.29
8.1.160.0000.00721.95
8.1.150.0060.00318.79
8.1.140.0000.00717.39
8.1.130.0060.00317.75
8.1.120.0070.00317.37
8.1.110.0040.00417.35
8.1.100.0040.00417.32
8.1.90.0030.00317.44
8.1.80.0090.00017.45
8.1.70.0030.00317.34
8.1.60.0040.00417.46
8.1.50.0000.00817.44
8.1.40.0070.00017.50
8.1.30.0050.00317.54
8.1.20.0050.00317.64
8.1.10.0040.00417.51
8.1.00.0040.00417.45
8.0.300.0000.00718.77
8.0.290.0070.00016.75
8.0.280.0070.00018.44
8.0.270.0050.00217.24
8.0.260.0000.00717.13
8.0.250.0000.00716.89
8.0.240.0030.00716.83
8.0.230.0070.00016.90
8.0.220.0000.00716.67
8.0.210.0000.00716.78
8.0.200.0030.00616.88
8.0.190.0050.00216.95
8.0.180.0040.00416.93
8.0.170.0040.00416.79
8.0.160.0070.00016.88
8.0.150.0000.00716.71
8.0.140.0070.00016.89
8.0.130.0030.00313.27
8.0.120.0000.00816.87
8.0.110.0040.00416.92
8.0.100.0040.00416.70
8.0.90.0050.00216.87
8.0.80.0030.01316.82
8.0.70.0080.00016.95
8.0.60.0040.00416.90
8.0.50.0030.00516.82
8.0.30.0120.00717.13
8.0.20.0170.01717.40
8.0.10.0000.00717.05
8.0.00.0090.01016.67
7.4.330.0020.00215.09
7.4.320.0080.00016.51
7.4.300.0030.00316.59
7.4.290.0040.00416.52
7.4.280.0070.00016.45
7.4.270.0040.00416.51
7.4.260.0040.00416.48
7.4.250.0040.00416.41
7.4.240.0030.00516.52
7.4.230.0030.00316.51
7.4.220.0090.01016.36
7.4.210.0090.00916.59
7.4.200.0000.00716.63
7.4.160.0030.01216.62
7.4.150.0080.01117.40
7.4.140.0110.01017.86
7.4.130.0050.01316.56
7.4.120.0110.00616.37
7.4.110.0060.01516.41
7.4.100.0130.00316.46
7.4.90.0130.00616.53
7.4.80.0080.01419.39
7.4.70.0070.01116.33
7.4.60.0000.01616.41
7.4.50.0040.00016.38
7.4.40.0060.00916.69
7.4.30.0100.00716.56
7.4.00.0000.01515.10
7.3.330.0000.00613.11
7.3.320.0110.00413.02
7.3.310.0000.00716.06
7.3.300.0030.00316.29
7.3.290.0080.00616.32
7.3.280.0090.00816.21
7.3.270.0070.01017.40
7.3.260.0120.00616.43
7.3.250.0110.00616.42
7.3.240.0150.00316.30
7.3.230.0110.00716.39
7.3.210.0100.00616.27
7.3.200.0070.01619.39
7.3.190.0120.00616.23
7.3.180.0100.00716.35
7.3.170.0110.00716.36
7.3.160.0060.01016.30
7.2.330.0120.00616.66
7.2.320.0070.01016.24
7.2.310.0110.00816.42
7.2.300.0110.00716.71
7.2.290.0070.01016.43
7.2.60.0070.00716.75
7.2.00.0060.00619.16
7.1.200.0080.00415.56
7.1.100.0070.00417.65
7.1.70.0040.00417.22
7.1.60.0100.01019.50
7.1.50.0070.01416.79
7.1.00.0070.07322.31
7.0.200.0620.00314.77
7.0.140.0070.06322.15
7.0.60.0100.03320.06
7.0.50.0070.08017.90
7.0.40.0100.08319.96
7.0.30.0270.04320.00
7.0.20.0230.06720.16
7.0.10.0200.04320.09
7.0.00.0100.08020.20
5.6.280.0070.07020.78
5.6.210.0070.04720.47
5.6.200.0000.05018.14
5.6.190.0200.07320.45
5.6.180.0200.07320.56
5.6.170.0370.07720.44
5.6.160.0130.07020.44
5.6.150.0070.05718.09
5.6.140.0100.07718.21
5.6.130.0130.07718.21
5.6.120.0100.04320.99
5.6.110.0100.06720.99
5.6.100.0070.08320.97
5.6.90.0070.08021.09
5.6.80.0030.08020.32
5.6.70.0200.06320.38
5.5.350.0130.08020.33
5.5.340.0000.04017.95
5.5.330.0030.05720.40
5.5.320.0170.05720.07
5.5.310.0270.07720.17
5.5.300.0170.07018.01
5.5.290.0000.05017.98
5.5.280.0130.05020.64
5.5.270.0070.05320.96
5.5.260.0030.08320.88
5.5.250.0100.08020.54
5.5.240.0130.07320.04
5.4.450.0770.05719.46
5.4.440.0830.05319.48
5.4.430.0830.05719.29
5.4.420.0800.05319.48
5.4.410.1070.06019.34
5.4.400.0270.04718.74
5.4.390.0230.05718.72
5.4.380.0370.04018.50
5.4.370.0200.05318.77
5.4.360.0130.05718.68
5.4.350.0200.05318.70
5.4.340.0230.05718.72
5.4.320.0230.07318.45
5.4.310.0200.07318.62
5.4.300.0200.05318.62
5.4.290.0130.06018.56
5.4.280.0230.05018.68
5.4.270.0270.05018.57
5.4.260.0100.06018.67
5.4.250.0200.05718.56
5.4.240.0200.05318.58
5.4.230.0130.05718.70
5.4.220.0200.05318.48
5.4.210.0200.05018.45
5.4.200.0230.04716.74
5.4.190.0170.06318.57
5.4.180.0270.05018.66
5.4.170.0270.05018.69
5.4.160.0230.04718.69
5.4.150.0200.05018.71
5.4.140.0170.05716.14
5.4.130.0170.05316.16
5.4.120.0130.05716.20
5.4.110.0200.04716.30
5.4.100.0270.04716.22
5.4.90.0100.06016.35
5.4.80.0230.04716.21
5.4.70.0270.04316.27
5.4.60.0230.05016.04
5.4.50.0130.05016.09
5.4.40.0130.05716.32
5.4.30.0170.05016.09
5.4.20.0200.05016.11
5.4.10.0200.04715.97
5.4.00.0270.04015.58
5.3.290.0170.06014.76
5.3.280.0200.05014.57
5.3.270.0230.05014.67
5.3.260.0230.04714.52
5.3.250.0170.05314.58
5.3.240.0100.06314.51
5.3.230.0300.05714.50
5.3.220.0270.06014.53
5.3.210.0300.04014.52
5.3.200.0270.04314.53
5.3.190.0130.05714.48
5.3.180.0170.05014.49
5.3.170.0200.04714.61
5.3.160.0230.04714.55
5.3.150.0230.04314.63
5.3.140.0130.05314.53
5.3.130.0170.05714.60
5.3.120.0230.05314.47
5.3.110.0170.06014.51
5.3.100.0130.05314.00
5.3.90.0200.04714.02
5.3.80.0130.05314.00
5.3.70.0230.04013.96
5.3.60.0170.05013.99
5.3.50.0130.05313.95
5.3.40.0200.05013.87
5.3.30.0100.05313.88
5.3.20.0200.04713.63
5.3.10.0170.04713.57
5.3.00.0100.05713.71
5.2.170.0130.04711.20
5.2.160.0170.03711.09
5.2.150.0130.04311.13
5.2.140.0130.04011.18
5.2.130.0100.04711.05
5.2.120.0070.04311.10
5.2.110.0200.03311.14
5.2.100.0200.03011.11
5.2.90.0100.04311.07
5.2.80.0200.04011.06
5.2.70.0130.04311.07
5.2.60.0130.04011.10
5.2.50.0170.03711.04
5.2.40.0230.02710.96
5.2.30.0070.04710.95
5.2.20.0100.04010.98
5.2.10.0030.04710.90
5.2.00.0070.05710.75
5.1.60.0070.03710.13
5.1.50.0130.0309.96
5.1.40.0070.03710.07
5.1.30.0100.03710.30
5.1.20.0100.03710.39
5.1.10.0100.03310.20
5.1.00.0170.03710.13
5.0.50.0070.0308.66
5.0.40.0100.0278.39
5.0.30.0030.0508.24
5.0.20.0030.0308.32
5.0.10.0070.0308.25
5.0.00.0200.0308.28
4.4.90.0100.0176.75
4.4.80.0000.0276.75
4.4.70.0030.0236.75
4.4.60.0030.0236.75
4.4.50.0100.0176.75
4.4.40.0030.0376.75
4.4.30.0130.0176.75
4.4.20.0030.0236.75
4.4.10.0070.0206.75
4.4.00.0030.0406.75
4.3.110.0030.0236.75
4.3.100.0130.0136.75
4.3.90.0030.0336.75
4.3.80.0070.0376.75
4.3.70.0100.0176.75
4.3.60.0100.0176.75
4.3.50.0100.0206.75
4.3.40.0100.0376.75
4.3.30.0070.0306.75
4.3.20.0100.0176.75
4.3.10.0030.0236.75
4.3.00.0100.0306.57

preferences:
46.76 ms | 400 KiB | 5 Q