3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr1 = array(5, 3, 9, 11, 6, 15); $arr2 = array(11, 20, 1, 3, 8); foreach($arr1 as $a) { $y = 5; $max = max(array_filter($arr2, function ($x, $y) { return $x < $y; })); echo $max; }

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.0070.00716.63
8.3.50.0100.00718.37
8.3.40.0110.01118.86
8.3.30.0120.00319.04
8.3.20.0000.00820.16
8.3.10.0040.00423.48
8.3.00.0030.00719.51
8.2.180.0150.00018.30
8.2.170.0090.00622.96
8.2.160.0160.00620.22
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0050.00326.16
8.2.120.0080.00022.29
8.2.110.0140.00722.26
8.2.100.0100.00317.66
8.2.90.0030.00619.22
8.2.80.0000.00817.97
8.2.70.0090.00017.47
8.2.60.0040.00417.93
8.2.50.0000.00818.07
8.2.40.0030.00519.93
8.2.30.0070.00018.12
8.2.20.0040.00417.72
8.2.10.0030.00618.19
8.2.00.0000.00717.81
8.1.270.0040.00423.91
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0030.00623.82
8.1.230.0030.00719.17
8.1.220.0000.00817.80
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0000.00817.23
8.1.180.0040.00418.88
8.1.170.0030.00618.50
8.1.160.0040.00421.95
8.1.150.0000.00718.77
8.1.140.0040.00417.46
8.1.130.0030.00317.80
8.1.120.0000.00717.42
8.1.110.0080.00017.41
8.1.100.0000.00717.46
8.1.90.0040.00417.50
8.1.80.0030.00517.37
8.1.70.0070.00017.42
8.1.60.0050.00317.62
8.1.50.0080.00017.42
8.1.40.0000.00817.44
8.1.30.0080.00017.55
8.1.20.0040.00417.56
8.1.10.0080.00017.58
8.1.00.0060.00317.50
8.0.300.0050.00218.77
8.0.290.0000.00717.05
8.0.280.0070.00018.51
8.0.270.0040.00417.17
8.0.260.0000.00617.17
8.0.250.0070.00017.06
8.0.240.0000.00817.01
8.0.230.0000.00717.05
8.0.220.0080.00016.95
8.0.210.0000.00716.96
8.0.200.0070.00017.09
8.0.190.0030.00616.92
8.0.180.0030.00516.97
8.0.170.0000.00916.87
8.0.160.0000.00817.07
8.0.150.0050.00216.86
8.0.140.0030.00516.90
8.0.130.0060.00313.35
8.0.120.0030.00616.82
8.0.110.0040.00416.94
8.0.100.0080.00016.97
8.0.90.0000.00816.83
8.0.80.0110.00617.02
8.0.70.0050.00316.95
8.0.60.0000.00716.91
8.0.50.0000.00716.76
8.0.30.0090.01017.12
8.0.20.0090.00917.40
8.0.10.0000.00716.91
8.0.00.0080.01116.94
7.4.330.0020.00215.07
7.4.320.0000.00716.55
7.4.300.0000.00616.61
7.4.290.0000.00716.58
7.4.280.0040.00416.40
7.4.270.0000.00716.40
7.4.260.0000.00716.41
7.4.250.0040.00416.43
7.4.240.0010.00616.53
7.4.230.0030.00316.50
7.4.220.0060.01216.51
7.4.210.0060.00816.61
7.4.200.0040.00416.63
7.4.190.0070.00016.72
7.4.160.0130.00616.54
7.4.150.0090.00917.40
7.4.140.0090.00917.86
7.4.130.0120.00816.45
7.4.120.0110.00916.43
7.4.110.0160.00316.46
7.4.100.0140.00316.48
7.4.90.0130.00416.63
7.4.80.0120.00619.39
7.4.70.0120.00816.70
7.4.60.0030.01416.36
7.4.50.0030.00516.45
7.4.40.0120.00416.48
7.4.30.0080.00816.64
7.4.00.0040.01215.04
7.3.330.0000.00513.32
7.3.320.0020.00313.43
7.3.310.0030.00316.47
7.3.300.0000.00716.33
7.3.290.0030.01816.33
7.3.280.0150.00416.33
7.3.270.0120.00617.40
7.3.260.0120.01216.38
7.3.250.0090.01216.40
7.3.240.0140.00316.55
7.3.230.0180.00016.44
7.3.210.0080.00816.56
7.3.200.0150.00519.39
7.3.190.0100.01316.51
7.3.180.0030.01316.59
7.3.170.0000.01516.36
7.3.160.0130.01016.41
7.3.120.0040.01214.78
7.2.330.0070.01116.70
7.2.320.0110.00616.70
7.2.310.0030.01716.66
7.2.300.0040.01516.71
7.2.290.0080.00816.49
7.2.60.0060.01017.02
7.2.00.0060.00619.46
7.1.200.0030.01015.80
7.1.100.0100.00318.21
7.1.70.0000.00817.20
7.1.60.0160.01019.46
7.1.50.0190.00317.02
7.1.00.0100.07022.36
7.0.200.0000.01016.85
7.0.140.0000.07722.00
7.0.60.0230.06320.07
7.0.50.0100.06717.87
7.0.40.0100.04019.96
7.0.30.0270.06020.10
7.0.20.0330.04720.21
7.0.10.0100.08720.13
7.0.00.0070.08320.32
5.6.280.0000.07320.86
5.6.210.0100.07020.75
5.6.200.0100.05018.24
5.6.190.0100.04720.39
5.6.180.0400.06720.52
5.6.170.0270.07720.47
5.6.160.0100.08020.62
5.6.150.0130.07318.29
5.6.140.0070.04718.21
5.6.130.0230.05318.18
5.6.120.0100.05021.02
5.6.110.0130.07021.01
5.6.100.0100.04721.09
5.6.90.0130.07721.00
5.6.80.0070.07020.40
5.5.350.0230.08020.30
5.5.340.0130.07017.98
5.5.330.0030.08320.28
5.5.320.0000.06020.35
5.5.310.0300.07320.37
5.5.300.0030.05717.98
5.5.290.0070.08317.95
5.5.280.0070.04320.77
5.5.270.0070.05320.76
5.5.260.0000.06320.86
5.5.250.0100.05720.70
5.5.240.0130.07720.15
5.4.450.0200.05019.57
5.4.440.0970.05019.57
5.4.430.1130.04719.70
5.4.420.1130.05019.61
5.4.410.0800.06319.21
5.4.400.1070.05019.01
5.4.390.1030.06319.33
5.4.380.0930.06018.56
5.4.370.0870.06018.62
5.4.360.0900.04718.50
5.4.350.0870.05718.80
5.4.340.0870.06018.75
5.4.320.0060.03612.50
5.4.310.0050.04812.50
5.4.300.0070.03812.50
5.4.290.0150.06912.48
5.4.280.0160.08612.38
5.4.270.0110.05712.38
5.4.260.0110.06712.38
5.4.250.0100.07312.38
5.4.240.0120.05012.38
5.4.230.0080.05912.38
5.4.220.0140.07712.38
5.4.210.0070.04812.38
5.4.200.0080.05512.38
5.4.190.0130.05312.37
5.4.180.0090.05312.36
5.4.170.0080.05612.38
5.4.160.0070.04012.38
5.4.150.0070.04012.37
5.4.140.0100.04212.05
5.4.130.0040.04412.04
5.4.120.0090.04712.00
5.4.110.0090.04612.00
5.4.100.0140.05812.00
5.4.90.0070.06211.99
5.4.80.0100.05512.00
5.4.70.0150.07511.99
5.4.60.0050.08511.99
5.4.50.0110.06211.99
5.4.40.0060.07411.98
5.4.30.0130.06711.98
5.4.20.0100.05211.98
5.4.10.0150.04011.98
5.4.00.0100.05011.47
5.3.290.0060.04112.80
5.3.280.0160.07912.71
5.3.270.0100.06612.73
5.3.260.0140.05512.72
5.3.250.0130.05012.72
5.3.240.0090.04412.72
5.3.230.0110.03512.71
5.3.220.0060.04012.68
5.3.210.0110.06512.68
5.3.200.0120.06412.68
5.3.190.0080.06312.68
5.3.180.0060.05112.67
5.3.170.0090.03812.67
5.3.160.0130.05012.68
5.3.150.0090.05412.67
5.3.140.0080.04312.66
5.3.130.0080.04712.66
5.3.120.0040.05512.66
5.3.110.0140.04412.66
5.3.100.0060.05612.12
5.3.90.0110.05112.10
5.3.80.0060.04812.09
5.3.70.0080.03812.09
5.3.60.0140.04512.07
5.3.50.0050.04112.02
5.3.40.0090.03812.02
5.3.30.0080.03611.98
5.3.20.0040.04011.75
5.3.10.0080.05411.73
5.3.00.0050.08611.72
5.2.170.0080.0439.18
5.2.160.0290.0989.19
5.2.150.0140.0589.19
5.2.140.0050.0449.18
5.2.130.0080.0419.14
5.2.120.0100.0379.14
5.2.110.0190.0749.15
5.2.100.0030.0449.14
5.2.90.0050.0439.14
5.2.80.0040.0329.14
5.2.70.0070.0419.15
5.2.60.0070.0299.09
5.2.50.0050.0369.07
5.2.40.0070.0309.04
5.2.30.0020.0339.02
5.2.20.0050.0299.00
5.2.10.0030.0308.92
5.2.00.0040.0308.78
5.1.60.0070.0228.08
5.1.50.0030.0318.07
5.1.40.0060.0288.05
5.1.30.0080.0258.39
5.1.20.0050.0278.42
5.1.10.0050.0298.14
5.1.00.0030.0318.15
5.0.50.0050.0206.63
5.0.40.0050.0226.48
5.0.30.0040.0336.29
5.0.20.0060.0186.27
5.0.10.0060.0406.24
5.0.00.0060.0296.24
4.4.90.0020.0174.77
4.4.80.0030.0164.75
4.4.70.0060.0134.75
4.4.60.0030.0164.76
4.4.50.0030.0174.77
4.4.40.0040.0254.71
4.4.30.0050.0144.76
4.4.20.0020.0174.84
4.4.10.0020.0184.85
4.4.00.0060.0244.76
4.3.110.0030.0254.66
4.3.100.0030.0294.66
4.3.90.0040.0254.63
4.3.80.0070.0354.59
4.3.70.0050.0314.63
4.3.60.0100.0314.63
4.3.50.0040.0274.63
4.3.40.0060.0354.54
4.3.30.0030.0233.28
4.3.20.0090.0213.26
4.3.10.0050.0213.23
4.3.00.0070.01016.04

preferences:
52.92 ms | 400 KiB | 5 Q