3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = [1,2,2,3,3,3,4,4,4,4]; $b = [2,3,5]; var_dump( array_intersect($a, $b), // [2,2,3,3,3] array_intersect($b, $a) // [2,3] );

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.20.0130.00617.71
8.4.10.0130.00317.55
8.3.140.0080.00018.11
8.3.130.0040.00416.68
8.3.120.0040.00420.61
8.3.110.0100.00018.24
8.3.100.0000.00824.06
8.3.90.0050.00326.77
8.3.80.0060.00316.63
8.3.70.0160.00018.31
8.3.60.0090.00618.43
8.3.50.0100.00821.94
8.3.40.0040.01118.68
8.3.30.0150.00018.59
8.3.20.0040.00420.09
8.3.10.0040.00421.77
8.3.00.0080.00019.52
8.2.260.0070.00716.78
8.2.250.0160.00016.75
8.2.240.0060.00318.82
8.2.230.0030.00620.94
8.2.220.0130.00637.54
8.2.210.0030.00326.77
8.2.200.0090.00316.63
8.2.190.0040.01816.63
8.2.180.0140.00018.04
8.2.170.0080.00822.96
8.2.160.0120.00319.07
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0000.00826.16
8.2.120.0060.00319.44
8.2.110.0160.00620.47
8.2.100.0110.00018.04
8.2.90.0080.00019.07
8.2.80.0090.00017.97
8.2.70.0040.00417.63
8.2.60.0040.00417.90
8.2.50.0050.00318.10
8.2.40.0090.00020.47
8.2.30.0060.00319.09
8.2.20.0050.00317.54
8.2.10.0000.00717.99
8.2.00.0000.00718.04
8.1.310.0060.00316.43
8.1.300.0000.00816.55
8.1.290.0030.00618.88
8.1.280.0040.01125.92
8.1.270.0080.00023.70
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0090.00020.98
8.1.230.0000.01119.07
8.1.220.0060.00317.74
8.1.210.0090.00018.77
8.1.200.0030.00617.00
8.1.190.0030.00517.10
8.1.180.0050.00218.10
8.1.170.0000.00818.50
8.1.160.0080.00022.13
8.1.150.0000.00718.82
8.1.140.0040.00419.38
8.1.130.0030.00317.39
8.1.120.0080.00017.25
8.1.110.0110.00017.41
8.1.100.0040.00417.38
8.1.90.0000.00817.32
8.1.80.0030.00417.27
8.1.70.0040.00417.29
8.1.60.0020.00517.50
8.1.50.0050.00317.37
8.1.40.0080.00017.50
8.1.30.0000.00817.62
8.1.20.0030.00617.51
8.1.10.0000.00717.45
8.1.00.0000.00817.38
8.0.300.0000.00718.77
8.0.290.0080.00016.63
8.0.280.0000.00718.37
8.0.270.0030.00317.06
8.0.260.0030.00316.86
8.0.250.0000.00616.77
8.0.240.0030.00316.90
8.0.230.0030.00316.90
8.0.220.0040.00416.70
8.0.210.0000.00716.72
8.0.200.0000.00716.79
8.0.190.0000.00816.89
8.0.180.0030.00516.67
8.0.170.0040.00416.86
8.0.160.0000.00816.75
8.0.150.0000.00716.67
8.0.140.0000.00816.85
8.0.130.0030.00313.33
8.0.120.0080.00016.67
8.0.110.0000.00816.75
8.0.100.0040.00416.76
8.0.90.0000.00716.63
8.0.80.0090.00616.86
8.0.70.0050.00216.66
8.0.60.0000.00716.87
8.0.50.0040.00416.82
8.0.30.0120.00716.95
8.0.20.0050.01717.40
8.0.10.0040.00416.83
8.0.00.0100.00716.84
7.4.330.0030.00315.08
7.4.320.0050.00216.50
7.4.300.0040.00416.34
7.4.290.0000.00716.52
7.4.280.0030.00416.44
7.4.270.0000.00616.57
7.4.260.0030.00316.52
7.4.250.0070.00016.44
7.4.240.0040.00416.45
7.4.230.0030.00516.61
7.4.220.0140.00416.36
7.4.210.0030.01716.35
7.4.200.0000.00716.50
7.4.160.0080.01216.20
7.4.150.0140.00417.40
7.4.140.0200.00317.86
7.4.130.0100.00616.46
7.4.120.0100.00716.45
7.4.110.0100.01316.48
7.4.100.0130.01016.34
7.4.90.0090.00916.26
7.4.80.0060.01019.39
7.4.70.0100.00516.29
7.4.60.0170.00016.26
7.4.50.0060.00816.50
7.4.40.0080.01616.46
7.4.30.0090.00616.36
7.4.10.0090.00915.00
7.4.00.0050.01114.84
7.3.330.0000.00612.87
7.3.320.0020.00212.97
7.3.310.0000.00716.10
7.3.300.0000.00716.08
7.3.290.0060.00916.14
7.3.280.0100.01316.13
7.3.270.0030.01417.40
7.3.260.0130.00716.13
7.3.250.0120.00516.29
7.3.240.0100.01016.35
7.3.230.0070.01116.49
7.3.210.0120.00616.08
7.3.200.0130.00616.15
7.3.190.0060.00916.13
7.3.180.0090.01216.19
7.3.170.0070.01316.43
7.3.160.0030.01316.34
7.3.130.0030.01414.65
7.3.120.0080.00814.61
7.3.110.0070.00914.66
7.3.100.0070.00614.63
7.3.90.0080.00614.57
7.3.80.0040.00914.68
7.3.70.0020.01114.57
7.3.60.0050.00814.73
7.3.50.0060.00814.57
7.3.40.0100.00514.58
7.3.30.0090.00614.61
7.3.20.0060.00716.61
7.3.10.0060.00716.54
7.3.00.0070.00716.53
7.2.330.0030.01416.40
7.2.320.0140.00716.44
7.2.310.0100.01016.34
7.2.300.0060.01616.36
7.2.290.0140.00316.25
7.2.260.0110.00714.54
7.2.250.0090.00914.87
7.2.240.0040.01115.02
7.2.230.0090.00714.83
7.2.220.0060.00814.80
7.2.210.0040.01014.76
7.2.200.0060.00714.85
7.2.190.0080.00814.70
7.2.180.0050.00914.80
7.2.170.0080.00914.73
7.2.160.0030.01314.83
7.2.150.0080.00916.68
7.2.140.0060.00716.75
7.2.130.0040.01216.61
7.2.120.0090.00416.51
7.2.110.0060.00816.62
7.2.100.0080.00716.64
7.2.90.0040.01216.69
7.2.80.0050.01016.65
7.2.70.0050.00916.68
7.2.60.0070.00516.71
7.2.50.0070.00916.68
7.2.40.0050.00816.69
7.2.30.0030.00916.75
7.2.20.0080.00616.69
7.2.10.0050.01016.65
7.2.00.0020.00916.71
7.1.330.0100.00415.68
7.1.320.0060.00615.67
7.1.310.0060.00615.80
7.1.300.0070.00715.75
7.1.290.0060.00715.66
7.1.280.0030.01015.66
7.1.270.0070.00715.74
7.1.260.0070.00615.79
7.1.250.0070.00715.74
7.1.240.0060.00615.81
7.1.230.0060.00615.76
7.1.220.0120.00315.60
7.1.210.0000.01015.88
7.1.200.0100.00415.62
7.1.190.0070.01015.68
7.1.180.0040.00415.55
7.1.170.0070.00715.66
7.1.160.0000.01515.64
7.1.150.0140.00015.78
7.1.140.0000.00915.69
7.1.130.0030.01015.68
7.1.120.0030.01115.59
7.1.110.0060.00315.80
7.1.100.0070.01015.66
7.1.90.0040.00816.77
7.1.80.0040.00616.67
7.1.70.0050.00716.55
7.1.60.0080.01023.46
7.1.50.0120.00925.17
7.1.40.0070.01025.03
7.1.30.0110.00825.06
7.1.20.0110.01125.09
7.1.10.0080.00616.15
7.1.00.0040.02418.17
7.0.330.0030.01015.34
7.0.320.0070.00315.16
7.0.310.0030.00915.25
7.0.300.0050.00315.09
7.0.290.0040.00815.38
7.0.280.0030.01015.50
7.0.270.0040.01115.42
7.0.260.0000.01015.31
7.0.250.0080.00415.42
7.0.240.0070.00715.18
7.0.230.0020.00816.51
7.0.220.0050.00716.33
7.0.210.0100.00515.93
7.0.200.0140.00615.54
7.0.190.0070.00615.90
7.0.180.0060.00515.71
7.0.170.0030.01015.75
7.0.160.0020.00915.62
7.0.150.0070.00715.83
7.0.140.0030.01015.76
7.0.130.0060.00615.90
7.0.120.0020.01015.97
7.0.110.0080.00515.82
7.0.100.0030.00715.76
7.0.90.0030.00615.83
7.0.80.0020.01215.84
7.0.70.0290.02917.22
7.0.60.0250.02717.02
7.0.50.0300.02517.29
7.0.40.0380.03416.88
7.0.30.0370.03016.82
7.0.20.0390.03416.84
7.0.10.0360.02116.93
7.0.00.0340.02516.95
5.6.400.0030.01014.41
5.6.390.0000.00814.42
5.6.380.0030.01014.46
5.6.370.0070.00714.27
5.6.360.0080.00314.32
5.6.350.0070.00314.44
5.6.340.0040.00714.20
5.6.330.0070.01014.14
5.6.320.0070.00714.50
5.6.310.0100.00314.31
5.6.300.0090.02717.61
5.6.290.0060.03017.35
5.6.280.0070.04318.59
5.6.270.0130.02917.64
5.6.260.0090.02717.73
5.6.250.0120.02617.38
5.6.240.0070.03317.45
5.6.230.0100.03517.51
5.6.220.0290.04518.48
5.6.210.0250.04618.51
5.6.200.0380.05018.68
5.6.190.0340.05118.73
5.6.180.0320.04218.69
5.6.170.0310.04818.59
5.6.160.0320.04418.70
5.6.150.0340.04618.64
5.6.140.0260.04318.77
5.6.130.0360.04218.67
5.6.120.0100.04918.61
5.6.110.0190.03918.73
5.6.100.0280.04118.80
5.6.90.0340.04518.68
5.6.80.0300.03918.24
5.6.70.0310.03718.24
5.6.60.0320.04118.24
5.6.50.0110.03718.25
5.6.40.0300.03718.32
5.6.30.0220.04418.26
5.6.20.0250.04518.25
5.6.10.0320.03418.27
5.6.00.0200.04018.15
5.5.380.0140.04817.41
5.5.370.0130.05417.45
5.5.360.0330.05918.88
5.5.350.0450.06118.94
5.5.340.0440.05219.45
5.5.330.0500.05919.44
5.5.320.0450.06919.41
5.5.310.0550.06119.32
5.5.300.0420.05919.46
5.5.290.0400.06719.19
5.5.280.0130.07919.50
5.5.270.0350.06419.26
5.5.260.0370.05719.38
5.5.250.0320.06019.20
5.5.240.0400.05318.83
5.5.230.0400.05618.68
5.5.220.0380.05718.82
5.5.210.0200.05918.78
5.5.200.0170.05518.74
5.5.190.0400.05018.79
5.5.180.0370.05818.75
5.5.160.0320.05618.67
5.5.150.0300.05318.64
5.5.140.0400.05318.63
5.5.130.0430.04918.79
5.5.120.0370.05318.78
5.5.110.0700.06318.67
5.5.100.0470.06118.70
5.5.90.0400.05218.70
5.5.80.0380.05218.53
5.5.70.0450.05418.63
5.5.60.0520.05918.58
5.5.50.0580.05818.71
5.5.40.0320.06218.58
5.5.30.0350.05618.66
5.5.20.0450.06218.54
5.5.10.0330.05818.66
5.5.00.0440.05618.52
5.4.450.0190.05119.25
5.4.440.0030.06019.41
5.4.430.0100.05219.20
5.4.420.0170.04319.11
5.4.410.0060.05419.23
5.4.400.0100.04918.86
5.4.390.0030.05819.08
5.4.380.0130.05418.85
5.4.370.0070.05118.92
5.4.360.0090.05418.88
5.4.350.0060.05418.85
5.4.340.0000.06018.92
5.4.320.0030.06118.96
5.4.310.0170.04018.99
5.4.300.0100.04718.79
5.4.290.0030.05718.94
5.4.280.0070.05718.95
5.4.270.0130.06618.76
5.4.260.0200.03719.09
5.4.250.0070.06218.97
5.4.240.0120.04718.97
5.4.230.0130.04719.09
5.4.220.0090.05318.88
5.4.210.0130.05319.05
5.4.200.0130.04519.04
5.4.190.0030.05518.86
5.4.180.0060.05419.00
5.4.170.0060.05218.99
5.4.160.0230.03518.80
5.4.150.0210.05318.77
5.4.140.0030.05616.29
5.4.130.0070.04716.47
5.4.120.0100.04516.49
5.4.110.0000.05516.61
5.4.100.0030.05216.55
5.4.90.0100.04416.34
5.4.80.0100.04516.50
5.4.70.0070.06016.61
5.4.60.0070.04916.48
5.4.50.0130.06316.27
5.4.40.0120.05516.54
5.4.30.0070.06016.27
5.4.20.0000.05916.27
5.4.10.0160.05116.47
5.4.00.0080.05615.89
5.3.290.0090.05114.78
5.3.280.0070.04914.67
5.3.270.0070.05014.75
5.3.260.0140.04414.77
5.3.250.0100.05014.60
5.3.240.0070.05014.59
5.3.230.0070.05014.59
5.3.220.0130.04614.50
5.3.210.0100.04714.63
5.3.200.0100.04614.38
5.3.190.0070.05114.55
5.3.180.0100.04914.70
5.3.170.0100.04614.61
5.3.160.0030.05514.63
5.3.150.0130.06514.72
5.3.140.0090.05314.49
5.3.130.0160.06214.53
5.3.120.0250.05314.65
5.3.110.0100.05614.71
5.3.100.0070.05013.96
5.3.90.0070.06714.00
5.3.80.0060.05113.95
5.3.70.0000.06114.02
5.3.60.0100.06213.81
5.3.50.0130.05914.06
5.3.40.0060.06913.93
5.3.30.0060.06414.11
5.3.20.0130.04613.68
5.3.10.0120.04413.46
5.3.00.0030.05513.63
5.2.170.0000.06211.37
5.2.160.0000.04711.12
5.2.150.0100.04911.28
5.2.140.0070.05611.28
5.2.130.0100.03411.30
5.2.120.0030.04311.24
5.2.110.0030.04111.31
5.2.100.0090.04111.02
5.2.90.0160.04111.29
5.2.80.0070.05311.16
5.2.70.0070.04011.07
5.2.60.0070.04611.28
5.2.50.0130.03211.16
5.2.40.0070.03611.14
5.2.30.0160.02911.20
5.2.20.0030.04110.89
5.2.10.0090.03510.73
5.2.00.0030.04211.00
5.1.60.0070.03310.02
5.1.50.0040.04210.18
5.1.40.0030.03810.27
5.1.30.0070.03310.48
5.1.20.0030.04810.40
5.1.10.0100.03210.10
5.1.00.0100.03210.38
5.0.50.0000.0318.62
5.0.40.0030.0278.68
5.0.30.0000.0468.53
5.0.20.0070.0248.24
5.0.10.0060.0318.26
5.0.00.0000.0448.13
4.4.90.0000.0247.28
4.4.80.0000.0237.28
4.4.70.0000.0247.28
4.4.60.0040.0197.28
4.4.50.0030.0207.28
4.4.40.0030.0387.28
4.4.30.0000.0247.28
4.4.20.0030.0217.28
4.4.10.0030.0227.28
4.4.00.0060.0347.28
4.3.110.0030.0227.28
4.3.100.0030.0197.28
4.3.90.0060.0227.28
4.3.80.0000.0357.28
4.3.70.0060.0217.28
4.3.60.0060.0187.28
4.3.50.0130.0107.28
4.3.40.0070.0297.28
4.3.30.0060.0187.28
4.3.20.0030.0217.28
4.3.10.0000.0247.28
4.3.00.0030.0217.28

preferences:
82.03 ms | 403 KiB | 5 Q