3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = ['a', 'b', 'c']; $bar = ['d', 'd', 'f']; print_r(array_intersect_key($foo,array_rand($foo, 2)));

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)
7.4.00.0060.00914.69
7.3.120.0070.01114.90
7.3.110.0070.01114.84
7.3.100.0100.01014.61
7.3.90.0030.01014.73
7.3.80.0000.01414.91
7.3.70.0030.01014.63
7.3.60.0040.01114.60
7.3.50.0000.01014.87
7.3.40.0100.00714.76
7.3.30.0030.01014.40
7.3.20.0030.00716.68
7.3.10.0110.00416.59
7.3.00.0090.00016.66
7.2.250.0120.00014.89
7.2.240.0030.01714.62
7.2.230.0100.00715.04
7.2.220.0060.00914.82
7.2.210.0110.00014.83
7.2.200.0100.00314.77
7.2.190.0060.00914.69
7.2.180.0030.01414.76
7.2.170.0030.00614.82
7.2.160.0030.01014.98
7.2.150.0120.00016.61
7.2.140.0040.00816.44
7.2.130.0040.00816.38
7.2.120.0000.01316.70
7.2.110.0030.01416.49
7.2.100.0090.00616.85
7.2.90.0040.01116.74
7.2.80.0030.00616.51
7.2.70.0000.01416.87
7.2.60.0120.00016.78
7.2.50.0040.01116.66
7.2.40.0000.01316.79
7.2.30.0100.00716.89
7.2.20.0110.00416.76
7.2.10.0140.00016.73
7.2.00.0090.00616.54
7.1.330.0000.01815.63
7.1.320.0030.01215.64
7.1.310.0030.00915.74
7.1.300.0040.01115.53
7.1.290.0100.00615.91
7.1.280.0030.00815.79
7.1.270.0030.00915.71
7.1.260.0040.01115.63
7.1.250.0090.00315.92
7.1.240.0030.01215.75
7.1.230.0060.00615.76
7.1.220.0060.01015.89
7.1.210.0090.00315.84
7.1.200.0000.01415.80
7.1.190.0090.00615.64
7.1.180.0140.00015.72
7.1.170.0070.00715.64
7.1.160.0000.01315.60
7.1.150.0100.00315.76
7.1.140.0000.01415.80
7.1.130.0000.01215.69
7.1.120.0060.00615.75
7.1.110.0080.00415.78
7.1.100.0060.00615.54
7.1.90.0000.01115.55
7.1.80.0040.00815.50
7.1.70.0070.00816.39
7.1.60.0050.01117.53
7.1.50.0100.00916.27
7.1.40.0000.01315.56
7.1.30.0000.00915.83
7.1.20.0060.00915.79
7.1.10.0090.00615.76
7.1.00.0080.03019.11
7.0.330.0060.00615.20
7.0.320.0040.01015.06
7.0.310.0030.00915.29
7.0.300.0000.01015.33
7.0.290.0000.01015.40
7.0.280.0040.00715.14
7.0.270.0130.00015.32
7.0.260.0030.00715.32
7.0.250.0060.00615.38
7.0.240.0070.00715.47
7.0.230.0110.00415.32
7.0.220.0070.00715.27
7.0.210.0070.00715.18
7.0.200.0040.00715.95
7.0.190.0070.00715.09
7.0.180.0030.01315.54
7.0.170.0070.00715.28
7.0.160.0090.00315.21
7.0.150.0030.01015.31
7.0.140.0030.03818.53
7.0.130.0080.00615.09
7.0.120.0030.01315.49
7.0.110.0030.01015.21
7.0.100.0030.00515.40
7.0.90.0040.01115.22
7.0.80.0060.00615.12
7.0.70.0030.00715.20
7.0.60.0080.03017.57
7.0.50.0030.02516.67
7.0.40.0050.02716.77
7.0.30.0140.04016.83
7.0.20.0140.04316.88
7.0.10.0150.02716.74
7.0.00.0110.02316.81
5.6.400.0070.00714.37
5.6.390.0030.00614.14
5.6.380.0040.01114.25
5.6.370.0080.00414.24
5.6.360.0030.01014.20
5.6.350.0030.00814.46
5.6.340.0050.00514.20
5.6.330.0000.01414.20
5.6.320.0100.00314.37
5.6.310.0060.00614.44
5.6.300.0000.01114.20
5.6.290.0030.01014.26
5.6.280.0050.04117.74
5.6.270.0100.00714.30
5.6.260.0070.00714.12
5.6.250.0040.01114.18
5.6.240.0070.00714.41
5.6.230.0000.01414.25
5.6.220.0040.00414.43
5.6.210.0080.04317.55
5.6.200.0070.02216.22
5.6.190.0050.02517.40
5.6.180.0150.04017.43
5.6.170.0210.03017.35
5.6.160.0050.02517.37
5.6.150.0100.02816.21
5.6.140.0020.02716.36
5.6.130.0070.03516.25
5.6.120.0040.04517.50
5.6.110.0080.03517.58
5.6.100.0050.05317.60
5.6.90.0050.03817.78
5.6.80.0030.04317.41
5.6.70.2220.02817.29
5.6.60.0080.00614.27
5.6.50.0080.00414.05
5.6.40.0060.00914.23
5.6.30.0040.00714.10
5.6.20.0030.00913.89
5.6.10.0030.00914.16
5.6.00.0030.00913.97
5.5.380.0000.01814.27
5.5.370.0030.01414.04
5.5.360.0050.00814.26
5.5.350.0020.04117.19
5.5.340.0060.02316.13
5.5.330.0050.03817.19
5.5.320.0210.02217.37
5.5.310.0110.03017.32
5.5.300.0070.02916.13
5.5.290.0090.02015.96
5.5.280.0090.02617.53
5.5.270.0040.02817.46
5.5.260.0080.04517.43
5.5.250.0050.04617.39
5.5.240.0080.04317.13
5.5.230.0030.01414.03
5.5.220.0040.01113.82
5.5.210.0060.00813.90
5.5.200.0030.01013.98
5.5.190.0100.00714.13
5.5.180.0030.01413.70
5.5.170.0090.00514.11
5.5.160.0080.00514.00
5.5.150.0040.00413.87
5.5.140.0070.00714.19
5.5.130.0060.00914.25
5.5.120.0080.00314.14
5.5.110.0080.00814.17
5.5.100.0030.01014.00
5.5.90.0060.00614.29
5.5.80.0000.01014.24
5.5.70.0030.00914.30
5.5.60.0000.01713.81
5.5.50.0060.00613.92
5.5.40.0070.00313.98
5.5.30.0030.01014.05
5.5.20.0100.00014.18
5.5.10.0120.00614.15
5.5.00.0070.00413.61
5.4.450.1080.02715.18
5.4.440.0980.02015.12
5.4.430.1000.02515.12
5.4.420.1020.02015.11
5.4.410.1000.01815.23
5.4.400.0970.02815.05
5.4.390.1000.02114.91
5.4.380.1150.02315.02
5.4.370.1070.02015.13
5.4.360.1070.01915.00
5.4.350.1130.02315.09
5.4.340.1070.01815.00
5.4.330.0030.00910.92
5.4.320.1050.02215.10
5.4.310.1050.02015.13
5.4.300.1090.02214.94
5.4.290.1050.02715.14
5.4.280.1030.02715.04
5.4.270.1140.02015.01
5.4.260.1020.02214.87
5.4.250.1100.02014.97
5.4.240.1130.02014.87
5.4.230.1030.02115.07
5.4.220.1110.02115.04
5.4.210.0950.02315.10
5.4.200.0930.02314.77
5.4.190.1090.02315.08
5.4.180.1050.02414.84
5.4.170.1000.02115.22
5.4.160.1120.02414.83
5.4.150.0970.02415.21
5.4.140.1030.02613.65
5.4.130.1050.02213.65
5.4.120.0990.02213.80
5.4.110.1030.02813.80
5.4.100.1010.01913.58
5.4.90.1080.02413.55
5.4.80.1030.02613.65
5.4.70.1060.02013.71
5.4.60.1050.02513.87
5.4.50.1060.01913.54
5.4.40.1030.02513.73
5.4.30.1000.02713.69
5.4.20.0960.03113.63
5.4.10.1030.01913.65
5.4.00.1110.02213.44
5.3.290.1000.02312.43
5.3.280.0960.02212.18
5.3.270.0980.02312.24
5.3.260.1130.02512.38
5.3.250.0990.01912.49
5.3.240.1000.01812.30
5.3.230.1080.02112.32
5.3.220.0930.02512.25
5.3.210.1050.02512.14
5.3.200.0930.02312.26
5.3.190.0980.02112.29
5.3.180.1030.02312.43
5.3.170.1030.01912.48
5.3.160.1050.01512.46
5.3.150.1020.02212.43
5.3.140.0990.02012.41
5.3.130.0930.02212.37
5.3.120.1030.02112.30
5.3.110.1080.02012.26
5.3.100.0980.01912.08
5.3.90.1020.01912.10
5.3.80.1060.02012.07
5.3.70.1050.02012.02
5.3.60.1070.02412.13
5.3.50.0970.02511.96
5.3.40.1050.02111.91
5.3.30.0970.02312.05
5.3.20.0870.02411.77
5.3.10.1010.02311.57
5.3.00.1050.01911.70
5.2.170.1800.03311.00
5.2.160.1730.03711.10
5.2.150.1500.03011.04
5.2.140.1800.03010.99
5.2.130.1870.03711.26
5.2.120.1800.03010.94
5.2.110.1730.03310.93
5.2.100.1730.03311.01
5.2.90.1970.02710.95
5.2.80.1900.03710.95
5.2.70.1770.04011.14
5.2.60.1800.02311.05
5.2.50.1500.02710.87
5.2.40.1330.02311.07
5.2.30.1170.03010.98
5.2.20.1300.02710.82
5.2.10.1430.02310.77
5.2.00.1330.03010.65
5.1.60.1400.02010.12
5.1.50.1330.0279.93
5.1.40.1700.0279.85
5.1.30.1570.02310.42
5.1.20.1530.03010.43
5.1.10.1200.02710.16
5.1.00.1470.03310.17
5.0.50.0770.0338.45
5.0.40.0870.0278.25
5.0.30.0670.0308.12
5.0.20.0600.0208.28
5.0.10.0630.0278.29
5.0.00.0570.0338.14
4.4.90.0730.0237.59
4.4.80.0730.0137.59
4.4.70.0600.0207.59
4.4.60.0830.0237.59
4.4.50.1100.0237.59
4.4.40.0770.0237.59
4.4.30.0770.0237.59
4.4.20.0770.0237.59
4.4.10.0670.0207.59
4.4.00.0770.0307.59
4.3.110.0730.0137.59
4.3.100.0730.0137.59
4.3.90.0730.0177.59
4.3.80.0970.0377.59
4.3.70.0900.0237.59
4.3.60.0870.0207.59
4.3.50.0830.0207.59
4.3.40.0770.0307.59
4.3.30.0330.0177.59
4.3.20.0400.0177.59
4.3.10.0330.0177.59
4.3.00.0330.0137.59

preferences:
31.84 ms | 401 KiB | 5 Q