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', 'key30' ); $data = array( 'key1' => 10, 'key2' => 20, 'key3' => 30, 'key4' => 40, 'dato' => 60 ); if(count(array_intersect_key(array_flip($required), $data)) === count($required)) { echo "all exist"; }else{ echo "fail"; }

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.40.0070.01118.44
8.3.30.0130.00718.75
8.3.20.0000.00820.00
8.3.10.0040.00421.66
8.3.00.0040.00419.38
8.2.170.0070.00722.96
8.2.160.0100.00320.52
8.2.150.0070.00024.18
8.2.140.0070.00024.66
8.2.130.0040.00426.16
8.2.120.0090.00019.23
8.2.110.0030.00622.20
8.2.100.0120.00017.63
8.2.90.0050.00319.23
8.2.80.0090.00017.97
8.2.70.0030.00617.63
8.2.60.0040.00417.80
8.2.50.0040.00418.07
8.2.40.0040.00418.09
8.2.30.0050.00218.07
8.2.20.0000.00717.51
8.2.10.0040.00418.11
8.2.00.0080.00017.64
8.1.270.0040.00420.73
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0030.00623.88
8.1.230.0040.00818.97
8.1.220.0000.00817.75
8.1.210.0030.00518.77
8.1.200.0060.00317.23
8.1.190.0050.00317.36
8.1.180.0040.00418.10
8.1.170.0040.00420.36
8.1.160.0030.00522.02
8.1.150.0000.00718.90
8.1.140.0050.00217.36
8.1.130.0050.00517.80
8.1.120.0040.00417.46
8.1.110.0000.00817.44
8.1.100.0000.00717.37
8.1.90.0050.00317.38
8.1.80.0040.00417.51
8.1.70.0030.00317.41
8.1.60.0030.00517.55
8.1.50.0000.00817.41
8.1.40.0070.00017.57
8.1.30.0090.00017.68
8.1.20.0040.00417.55
8.1.10.0060.00317.50
8.1.00.0040.00417.42
8.0.300.0000.00818.77
8.0.290.0040.00416.63
8.0.280.0040.00418.33
8.0.270.0050.00217.26
8.0.260.0040.00417.25
8.0.250.0000.00716.94
8.0.240.0050.00316.92
8.0.230.0070.00016.89
8.0.220.0040.00416.76
8.0.210.0000.00916.82
8.0.200.0060.00316.75
8.0.190.0030.00316.89
8.0.180.0040.00416.93
8.0.170.0050.00316.96
8.0.160.0030.00616.74
8.0.150.0030.00316.88
8.0.140.0080.00016.89
8.0.130.0060.00013.33
8.0.120.0000.00716.74
8.0.110.0000.00716.82
8.0.100.0080.00016.71
8.0.90.0030.00517.01
8.0.80.0030.01216.88
8.0.70.0040.00416.96
8.0.60.0000.00716.77
8.0.50.0050.00316.82
8.0.30.0110.01317.27
8.0.20.0130.00717.40
8.0.10.0000.00716.83
8.0.00.0100.00816.74
7.4.330.0050.00015.15
7.4.320.0080.00016.59
7.4.300.0030.00316.60
7.4.290.0030.00316.53
7.4.280.0040.00416.49
7.4.270.0030.00316.50
7.4.260.0000.00716.47
7.4.250.0000.00716.59
7.4.240.0060.00216.54
7.4.230.0000.00716.68
7.4.220.0090.00916.57
7.4.210.0040.01116.61
7.4.200.0050.00216.25
7.4.160.0090.00616.43
7.4.150.0070.01317.40
7.4.140.0130.00517.86
7.4.130.0120.00716.46
7.4.120.0080.00916.42
7.4.110.0080.01316.38
7.4.100.0100.00916.55
7.4.90.0100.01016.31
7.4.80.0070.01019.39
7.4.70.0070.01016.52
7.4.60.0060.01016.47
7.4.50.0080.00016.37
7.4.40.0140.00316.51
7.4.30.0110.00716.70
7.4.00.0040.01115.06
7.3.330.0030.00313.00
7.3.320.0120.00013.18
7.3.310.0070.00016.22
7.3.300.0030.00516.25
7.3.290.0030.01116.29
7.3.280.0090.00716.29
7.3.270.0170.02017.40
7.3.260.0120.00616.45
7.3.250.0110.01116.44
7.3.240.0060.01516.52
7.3.230.0190.00316.47
7.3.210.0070.01016.46
7.3.200.0030.01919.39
7.3.190.0100.01016.31
7.3.180.0130.00316.31
7.3.170.0110.00616.50
7.3.160.0030.01416.54
7.3.10.0090.00616.79
7.3.00.0000.01016.56
7.2.330.0060.01416.34
7.2.320.0090.01216.32
7.2.310.0090.00916.46
7.2.300.0030.01316.70
7.2.290.0140.00316.70
7.2.130.0100.00316.87
7.2.120.0090.00316.50
7.2.110.0090.00616.77
7.2.100.0090.00616.63
7.2.90.0070.01016.66
7.2.80.0060.00916.57
7.2.70.0030.01216.59
7.2.60.0040.00716.46
7.2.50.0080.00816.73
7.2.40.0080.00416.62
7.2.30.0050.00516.67
7.2.20.0000.01617.00
7.2.10.0000.01116.49
7.2.00.0030.01018.04
7.1.250.0130.00315.61
7.1.100.0060.00618.05
7.1.70.0030.00317.10
7.1.60.0080.01519.50
7.1.50.0100.01016.94
7.1.00.0100.07022.31
7.0.200.1120.00314.75
7.0.140.0070.08322.15
7.0.60.0070.03719.86
7.0.50.0000.05017.89
7.0.40.0200.07720.20
7.0.30.0270.04020.00
7.0.20.0230.04319.99
7.0.10.0130.05320.30
7.0.00.0070.06020.09
5.6.280.0030.07021.04
5.6.210.0100.05320.59
5.6.200.0130.05718.18
5.6.190.0070.09020.67
5.6.180.0270.07720.61
5.6.170.0370.07320.38
5.6.160.0030.08720.51
5.6.150.0070.07718.21
5.6.140.0030.04318.23
5.6.130.0130.05318.15
5.6.120.0170.07321.01
5.6.110.0070.09020.97
5.6.100.0070.04720.97
5.6.90.0000.05721.10
5.6.80.0100.07320.36
5.6.70.0200.06020.38
5.5.350.0100.06320.38
5.5.340.0030.04317.99
5.5.330.0130.04320.19
5.5.320.0130.08320.43
5.5.310.0230.06720.28
5.5.300.0000.04318.02
5.5.290.0070.04717.96
5.5.280.0100.03720.96
5.5.270.0030.07720.78
5.5.260.0070.08020.86
5.5.250.0200.06320.55
5.5.240.0130.05720.07
5.4.450.0670.06319.10
5.4.440.0970.05319.63
5.4.430.0900.05319.48
5.4.420.1030.04319.47
5.4.410.0930.05719.51
5.4.400.0200.05018.72
5.4.390.0100.07018.72
5.4.380.0170.05718.75
5.4.370.0130.05718.62
5.4.360.0200.05318.66
5.4.350.0270.05018.52
5.4.340.0230.05318.77
5.4.320.0230.06018.56
5.4.310.0200.05018.53
5.4.300.0170.05318.69
5.4.290.0200.07018.61
5.4.280.0170.07718.71
5.4.270.0300.04018.77
5.4.260.0300.04018.49
5.4.250.0230.05018.58
5.4.240.0270.04318.70
5.4.230.0170.05318.51
5.4.220.0170.05318.51
5.4.210.0230.04318.70
5.4.200.0200.04316.52
5.4.190.0200.04718.70
5.4.180.0200.04718.75
5.4.170.0070.06318.75
5.4.160.0270.04318.44
5.4.150.0200.05018.65
5.4.140.0130.05316.23
5.4.130.0100.05716.09
5.4.120.0230.04716.14
5.4.110.0170.04716.34
5.4.100.0130.05316.15
5.4.90.0230.05016.22
5.4.80.0200.05016.25
5.4.70.0170.05716.09
5.4.60.0230.04716.14
5.4.50.0130.05016.17
5.4.40.0070.06016.11
5.4.30.0170.04716.09
5.4.20.0200.05016.09
5.4.10.0270.04016.07
5.4.00.0200.05715.54
5.3.290.0170.05714.76
5.3.280.0170.05014.56
5.3.270.0200.05014.57
5.3.260.0100.07014.64
5.3.250.0300.04314.50
5.3.240.0370.04314.53
5.3.230.0170.05314.63
5.3.220.0070.07314.64
5.3.210.0200.06014.66
5.3.200.0170.05014.52
5.3.190.0200.05014.61
5.3.180.0200.05014.57
5.3.170.0270.04314.52
5.3.160.0230.04314.52
5.3.150.0270.06014.59
5.3.140.0170.05714.47
5.3.130.0030.06714.64
5.3.120.0170.05714.59
5.3.110.0230.04714.55
5.3.100.0100.05714.04
5.3.90.0130.05713.99
5.3.80.0200.05013.99
5.3.70.0270.04313.95
5.3.60.0270.04713.97
5.3.50.0130.06014.04
5.3.40.0130.05313.92
5.3.30.0400.04713.94
5.3.20.0230.06013.65
5.3.10.0170.05013.63
5.3.00.0200.05313.55
5.2.170.0130.04311.11
5.2.160.0130.04711.11
5.2.150.0130.04311.18
5.2.140.0100.04711.11
5.2.130.0130.04011.15
5.2.120.0200.04011.25
5.2.110.0130.04011.05
5.2.100.0130.04711.05
5.2.90.0130.04711.08
5.2.80.0070.05311.08
5.2.70.0130.04311.07
5.2.60.0070.05711.02
5.2.50.0170.04010.93
5.2.40.0100.04311.02
5.2.30.0030.05010.96
5.2.20.0100.04310.87
5.2.10.0100.05710.91
5.2.00.0130.05310.70
5.1.60.0100.03310.01
5.1.50.0070.03710.13
5.1.40.0070.04010.00
5.1.30.0130.03310.36
5.1.20.0130.03710.39
5.1.10.0100.03710.20
5.1.00.0100.03710.13
5.0.50.0070.0308.61
5.0.40.0030.0308.47
5.0.30.0030.0478.24
5.0.20.0070.0308.32
5.0.10.0070.0308.26
5.0.00.0000.0508.33
4.4.90.0070.0206.72
4.4.80.0130.0136.72
4.4.70.0070.0206.72
4.4.60.0070.0206.72
4.4.50.0100.0206.72
4.4.40.0000.0406.72
4.4.30.0070.0206.72
4.4.20.0030.0236.72
4.4.10.0030.0236.72
4.4.00.0030.0376.72
4.3.110.0030.0336.72
4.3.100.0100.0206.72
4.3.90.0000.0306.72
4.3.80.0070.0406.72
4.3.70.0130.0176.72
4.3.60.0070.0206.72
4.3.50.0000.0276.72
4.3.40.0070.0336.72
4.3.30.0030.0236.72
4.3.20.0130.0176.72
4.3.10.0100.0176.72
4.3.00.0100.0236.57

preferences:
49.52 ms | 400 KiB | 5 Q