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, 'key5' => 50 ); if(count(array_intersect_key(array_flip($required), $data)) === count($required)) { echo "success" } 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)
5.6.80.0030.06320.35
5.5.240.0030.06320.23
5.4.400.0230.04718.79
5.4.390.0170.05718.75
5.4.380.0200.06318.56
5.4.370.0200.05318.80
5.4.360.0230.04718.80
5.4.350.0370.04018.79
5.4.340.0200.05018.61
5.4.320.0300.04318.74
5.4.310.0130.06018.50
5.4.300.0230.05018.80
5.4.290.0230.04718.74
5.4.280.0270.04718.83
5.4.270.0270.04718.46
5.4.260.0200.05318.60
5.4.250.0370.04018.77
5.4.240.0130.06318.74
5.4.230.0270.04718.71
5.4.220.0170.05718.45
5.4.210.0170.05718.77
5.4.200.0170.05716.82
5.4.190.0230.05718.51
5.4.180.0230.05018.70
5.4.170.0130.06018.67
5.4.160.0130.06718.54
5.4.150.0200.05318.50
5.4.140.0230.04716.33
5.4.130.0100.05716.27
5.4.120.0200.05016.19
5.4.110.0300.04316.28
5.4.100.0130.05316.26
5.4.90.0100.05316.25
5.4.80.0100.05316.19
5.4.70.0230.04716.18
5.4.60.0070.06316.26
5.4.50.0170.06716.14
5.4.40.0200.05016.16
5.4.30.0230.04316.16
5.4.20.0130.05316.22
5.4.10.0270.04016.25
5.4.00.0100.05715.74
5.3.290.0200.05014.66
5.3.280.0030.06314.60
5.3.270.0270.05714.54
5.3.260.0130.06314.68
5.3.250.0130.06014.61
5.3.240.0200.05014.66
5.3.230.0270.04014.59
5.3.220.0130.06714.50
5.3.210.0130.05314.54
5.3.200.0100.06014.55
5.3.190.0200.05014.60
5.3.180.0100.06014.52
5.3.170.0200.04714.59
5.3.160.0200.04714.66
5.3.150.0230.04714.47
5.3.140.0300.04314.55
5.3.130.0200.05314.50
5.3.120.0230.04714.48
5.3.110.0300.04014.55
5.3.100.0230.05013.94
5.3.90.0200.07014.02
5.3.80.0170.05314.11
5.3.70.0200.05014.00
5.3.60.0070.06013.97
5.3.50.0300.03713.92
5.3.40.0130.05313.94
5.3.30.0230.06313.89
5.3.20.0200.06313.80
5.3.10.0270.06013.75
5.3.00.0200.06713.52
5.2.170.0230.04011.18
5.2.160.0270.03011.08
5.2.150.0030.05311.15
5.2.140.0130.04711.28
5.2.130.0100.05311.16
5.2.120.0100.04311.14
5.2.110.0100.04711.07
5.2.100.0030.05011.10
5.2.90.0170.04311.26
5.2.80.0130.05311.14
5.2.70.0130.04311.03
5.2.60.0100.04710.96
5.2.50.0200.03711.15
5.2.40.0130.05711.04
5.2.30.0100.04311.03
5.2.20.0130.05010.91
5.2.10.0070.04310.89
5.2.00.0130.04710.74
5.1.60.0130.03710.01
5.1.50.0130.03310.06
5.1.40.0130.03710.10
5.1.30.0130.03310.31
5.1.20.0030.05010.42
5.1.10.0100.04010.14
5.1.00.0070.04310.14
5.0.50.0100.0308.66
5.0.40.0070.0278.39
5.0.30.0100.0508.24
5.0.20.0130.0208.28
5.0.10.0100.0238.35
5.0.00.0070.0438.28
4.4.90.0130.0136.72
4.4.80.0100.0206.72
4.4.70.0030.0236.72
4.4.60.0070.0206.72
4.4.50.0070.0276.72
4.4.40.0100.0436.72
4.4.30.0070.0236.72
4.4.20.0070.0236.72
4.4.10.0100.0176.72
4.4.00.0070.0336.72
4.3.110.0030.0236.72
4.3.100.0100.0276.72
4.3.90.0070.0206.72
4.3.80.0070.0376.72
4.3.70.0130.0136.72
4.3.60.0030.0236.72
4.3.50.0030.0306.72
4.3.40.0070.0336.72
4.3.30.0030.0236.72
4.3.20.0000.0336.72
4.3.10.0000.0236.72
4.3.00.0070.0176.57

preferences:
143.02 ms | 1394 KiB | 7 Q