3v4l.org

run code in 300+ PHP versions simultaneously
<?php $muLevelIds = [1,6,7,8,9]; $subjectLevelIds = [1,6,7,8]; $occLevelIds = [6,7]; var_dump(array_union($muLevelIds, $subjectLevelIds, $occLevelIds)); function array_union($muLevelIds, $subjectLevelIds, $occLevelIds) { $allLevelIds = [1,6,7,8,9]; $arrays = [$muLevelIds, $subjectLevelIds, $occLevelIds]; $comp = [$allLevelIds]; foreach ($arrays as $arr) { if (count($arr)) { $comp[] = $arr; } } $combined = call_user_func_array('array_intersect', $comp); return $combined; }

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.0150.00618.56
8.3.50.0120.00619.86
8.3.40.0120.00318.57
8.3.30.0130.00719.12
8.3.20.0080.00020.35
8.3.10.0090.00020.30
8.3.00.0040.00419.08
8.2.180.0070.00718.41
8.2.170.0140.01022.96
8.2.160.0180.00020.35
8.2.150.0080.00024.18
8.2.140.0060.00324.66
8.2.130.0040.00426.16
8.2.120.0090.00019.13
8.2.110.0100.00022.33
8.2.100.0000.01117.84
8.2.90.0030.00619.34
8.2.80.0000.00819.46
8.2.70.0040.00417.50
8.2.60.0040.00417.93
8.2.50.0080.00018.07
8.2.40.0000.00818.16
8.2.30.0070.00021.20
8.2.20.0050.00317.77
8.2.10.0070.00018.05
8.2.00.0000.00817.74
8.1.280.0070.00725.92
8.1.270.0060.00323.83
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0040.00720.77
8.1.230.0040.00720.85
8.1.220.0080.00018.77
8.1.210.0030.00618.99
8.1.200.0040.00717.35
8.1.190.0040.00417.53
8.1.180.0070.00318.10
8.1.170.0040.00418.43
8.1.160.0070.00018.95
8.1.150.0040.00418.81
8.1.140.0040.00417.38
8.1.130.0030.00317.86
8.1.120.0000.00717.37
8.1.110.0000.00817.34
8.1.100.0070.00017.42
8.1.90.0050.00217.35
8.1.80.0070.00017.41
8.1.70.0030.00317.45
8.1.60.0000.00817.66
8.1.50.0040.00417.57
8.1.40.0060.00317.49
8.1.30.0050.00317.64
8.1.20.0000.00817.52
8.1.10.0020.00517.54
8.1.00.0040.00417.36
8.0.300.0000.00719.83
8.0.290.0040.00417.05
8.0.280.0050.00318.38
8.0.270.0030.00317.18
8.0.260.0030.00317.32
8.0.250.0080.00016.86
8.0.240.0000.00816.86
8.0.230.0030.00616.91
8.0.220.0050.00316.80
8.0.210.0000.00816.93
8.0.200.0000.00616.97
8.0.190.0040.00416.84
8.0.180.0040.00416.90
8.0.170.0040.00416.86
8.0.160.0050.00317.00
8.0.150.0050.00216.85
8.0.140.0000.00716.85
8.0.130.0030.00313.25
8.0.120.0040.00416.88
8.0.110.0030.00516.80
8.0.100.0070.00016.73
8.0.90.0000.00716.90
8.0.80.0060.01616.97
8.0.70.0080.00016.82
8.0.60.0040.00416.81
8.0.50.0040.00416.88
8.0.30.0140.00517.07
8.0.20.0090.01017.40
8.0.10.0070.00016.97
8.0.00.0110.00616.68
7.4.330.0020.00215.06
7.4.320.0020.00516.52
7.4.300.0030.00316.43
7.4.290.0070.00016.51
7.4.280.0040.00416.59
7.4.270.0030.00316.66
7.4.260.0020.00716.42
7.4.250.0030.00516.57
7.4.240.0040.00316.48
7.4.230.0030.00316.69
7.4.220.0100.00716.60
7.4.210.0070.01016.54
7.4.200.0070.00016.70
7.4.160.0070.01716.46
7.4.150.0070.01117.40
7.4.140.0100.00817.86
7.4.130.0120.00616.42
7.4.120.0100.01116.48
7.4.110.0090.00916.63
7.4.100.0060.01216.43
7.4.90.0100.00716.50
7.4.80.0090.00916.57
7.4.70.0040.01416.62
7.4.60.0060.00916.36
7.4.50.0030.00916.52
7.4.40.0130.00716.51
7.4.30.0110.01116.48
7.4.00.0080.00614.80
7.3.330.0000.00513.23
7.3.320.0060.00013.18
7.3.310.0060.00316.21
7.3.300.0050.00216.35
7.3.290.0040.01016.25
7.3.280.0080.00916.30
7.3.270.0090.00817.40
7.3.260.0030.01316.49
7.3.250.0070.01216.45
7.3.240.0050.01016.43
7.3.230.0110.00616.53
7.3.210.0100.00716.59
7.3.200.0120.00919.39
7.3.190.0080.01116.32
7.3.180.0090.00816.56
7.3.170.0080.01416.46
7.3.160.0030.01316.62
7.3.120.0000.01615.07
7.3.110.0040.00814.88
7.3.100.0090.00614.80
7.3.90.0060.00914.84
7.3.80.0030.01314.84
7.3.70.0040.01214.50
7.3.60.0000.01314.68
7.3.50.0030.01314.66
7.3.40.0090.00614.80
7.3.30.0100.00014.85
7.3.20.0070.00316.71
7.3.10.0030.01016.50
7.3.00.0030.00916.53
7.2.330.0080.01216.69
7.2.320.0030.01716.68
7.2.310.0030.01316.57
7.2.300.0170.00716.45
7.2.290.0090.00916.45
7.2.240.0030.01015.16
7.2.230.0090.00015.26
7.2.220.0030.01015.03
7.2.210.0090.00315.00
7.2.200.0080.00414.81
7.2.190.0090.00615.08
7.2.180.0030.01215.16
7.2.170.0000.01715.15
7.2.160.0070.01015.24
7.2.150.0060.00816.83
7.2.140.0040.01117.02
7.2.130.0040.01116.78
7.2.120.0080.00316.78
7.2.110.0080.00416.97
7.2.100.0000.01616.79
7.2.90.0070.00717.10
7.2.80.0060.00916.82
7.2.70.0060.00917.01
7.2.60.0060.00616.93
7.2.50.0070.00717.05
7.2.40.0040.01416.91
7.2.30.0030.01017.01
7.2.20.0060.00617.07
7.2.10.0040.01417.06
7.2.00.0050.00918.21
7.1.330.0070.00615.57
7.1.320.0060.00315.85
7.1.310.0030.00915.92
7.1.300.0030.00715.79
7.1.290.0060.00615.80
7.1.280.0060.00315.71
7.1.270.0070.00715.52
7.1.260.0030.01015.55
7.1.250.0090.00615.58
7.1.100.0070.00718.09
7.1.70.0030.01217.23
7.1.60.0140.01119.34
7.1.50.0130.01017.00
7.1.00.0030.07722.56
7.0.200.0030.00716.91
7.0.140.0070.06022.20
7.0.60.0100.07720.07
7.0.50.0070.08317.90
7.0.40.0070.07720.15
7.0.30.0470.06020.23
7.0.20.0370.07720.17
7.0.10.0130.08020.30
7.0.00.0030.04320.10
5.6.280.0000.07320.86
5.6.210.0070.08320.45
5.6.200.0070.07318.14
5.6.190.0030.09020.41
5.6.180.0070.08320.41
5.6.170.0200.03720.44
5.6.160.0070.05320.41
5.6.150.0100.05018.15
5.6.140.0100.08018.23
5.6.130.0100.08018.22
5.6.120.0170.07321.14
5.6.110.0070.08021.15
5.6.100.0170.06021.01
5.6.90.0100.09321.04
5.6.80.0130.05320.51
5.5.350.0100.07720.30
5.5.340.0170.03717.98
5.5.330.0070.04020.29
5.5.320.0300.07320.52
5.5.310.0170.04320.51
5.5.300.0070.07318.06
5.5.290.0030.04718.05
5.5.280.0100.03720.80
5.5.270.0100.08720.84
5.5.260.0030.07720.87
5.5.250.0100.08020.58
5.5.240.0400.06020.24
5.4.450.0830.02719.64
5.4.440.0770.04019.63
5.4.430.1030.03319.41
5.4.420.0170.06719.32
5.4.410.0000.06719.42
5.4.400.0130.05019.02
5.4.390.0070.06018.98
5.4.380.0070.06019.06
5.4.370.0170.04719.15
5.4.360.0000.06719.02
5.4.350.0080.03312.02
5.4.340.0040.03712.02
5.4.320.0110.03512.51
5.4.310.0050.04012.50
5.4.300.0060.04112.50
5.4.290.0070.03912.50
5.4.280.0050.03912.40
5.4.270.0050.04312.39
5.4.260.0070.03812.39
5.4.250.0040.03912.40
5.4.240.0040.04112.39
5.4.230.0050.03912.39
5.4.220.0080.03712.39
5.4.210.0100.03212.39
5.4.200.0070.04112.39
5.4.190.0090.04112.39
5.4.180.0090.03612.38
5.4.170.0100.04012.39
5.4.160.0080.05612.39
5.4.150.0070.03712.39
5.4.140.0070.03812.07
5.4.130.0070.03812.06
5.4.120.0050.03712.02
5.4.110.0070.03412.01
5.4.100.0060.03612.01
5.4.90.0070.03812.01
5.4.80.0050.04012.01
5.4.70.0100.03112.00
5.4.60.0080.03212.00
5.4.50.0030.03812.01
5.4.40.0060.03412.00
5.4.30.0050.03712.00
5.4.20.0050.03611.99
5.4.10.0050.03611.99
5.4.00.0100.04711.48
5.3.290.0100.03612.80
5.3.280.0080.03612.70
5.3.270.0050.04512.72
5.3.260.0080.03812.71
5.3.250.0110.03312.72
5.3.240.0090.04412.71
5.3.230.0110.03912.70
5.3.220.0090.03612.68
5.3.210.0050.04012.68
5.3.200.0060.03512.68
5.3.190.0070.03712.68
5.3.180.0070.04112.68
5.3.170.0090.03712.67
5.3.160.0080.04112.67
5.3.150.0090.05212.68
5.3.140.0080.05012.66
5.3.130.0070.05912.66
5.3.120.0100.04212.66
5.3.110.0050.04612.66
5.3.100.0080.03912.12
5.3.90.0090.04312.08
5.3.80.0040.03912.08
5.3.70.0070.03912.07
5.3.60.0100.04612.06
5.3.50.0100.03612.00
5.3.40.0090.03712.00
5.3.30.0110.04611.95
5.3.20.0090.03411.73
5.3.10.0090.03611.70
5.3.00.0060.04011.68
5.2.170.0070.0329.18
5.2.160.0100.0299.19
5.2.150.0080.0349.18
5.2.140.0050.0309.18
5.2.130.0060.0289.14
5.2.120.0090.0289.14
5.2.110.0070.0299.15
5.2.100.0040.0319.14
5.2.90.0060.0319.14
5.2.80.0060.0349.13
5.2.70.0080.0319.14
5.2.60.0070.0309.09
5.2.50.0060.0319.06
5.2.40.0080.0309.03
5.2.30.0070.0309.01
5.2.20.0080.0279.00
5.2.10.0080.0318.92
5.2.00.0100.0518.79
5.1.60.0060.0258.07
5.1.50.0060.0288.07
5.1.40.0080.0258.04
5.1.30.0050.0288.39
5.1.20.0030.0338.42
5.1.10.0030.0278.14
5.1.00.0030.0278.14
5.0.50.0020.0236.62
5.0.40.0010.0226.48
5.0.30.0050.0326.29
5.0.20.0030.0226.26
5.0.10.0040.0206.24
5.0.00.0030.0326.23
4.4.90.0040.0184.78
4.4.80.0040.0164.76
4.4.70.0020.0184.75
4.4.60.0050.0174.75
4.4.50.0040.0184.77
4.4.40.0040.0324.71
4.4.30.0070.0134.76
4.4.20.0060.0174.84
4.4.10.0040.0154.85
4.4.00.0020.0264.76
4.3.110.0020.0184.67
4.3.100.0040.0174.66
4.3.90.0020.0164.63
4.3.80.0040.0244.59
4.3.70.0040.0134.63
4.3.60.0030.0154.63
4.3.50.0050.0134.63
4.3.40.0040.0234.54
4.3.30.0020.0163.28
4.3.20.0030.0153.26
4.3.10.0010.0173.22
4.3.00.0000.01713.38

preferences:
64.22 ms | 400 KiB | 5 Q