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 = $a; $max = max(array_filter($arr2, function ($x) use ($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.0100.00316.38
8.3.50.0080.00722.05
8.3.40.0150.00618.46
8.3.30.0080.00619.13
8.3.20.0000.00720.29
8.3.10.0080.00023.64
8.3.00.0100.00017.50
8.2.180.0090.00618.23
8.2.170.0100.00322.96
8.2.160.0130.00320.39
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0000.00822.08
8.2.110.0090.00022.24
8.2.100.0150.00017.59
8.2.90.0000.00718.95
8.2.80.0080.00017.97
8.2.70.0030.00617.63
8.2.60.0040.00417.93
8.2.50.0060.00318.07
8.2.40.0080.00019.78
8.2.30.0030.00519.73
8.2.20.0070.00017.61
8.2.10.0040.00418.23
8.2.00.0050.00317.63
8.1.280.0070.00725.92
8.1.270.0040.00424.02
8.1.260.0000.00726.35
8.1.250.0000.00728.09
8.1.240.0060.00323.75
8.1.230.0090.00319.07
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0000.00917.48
8.1.190.0060.00317.23
8.1.180.0030.00719.01
8.1.170.0080.00818.27
8.1.160.0000.00822.08
8.1.150.0040.00418.55
8.1.140.0030.00517.38
8.1.130.0000.00717.89
8.1.120.0080.00017.46
8.1.110.0070.00017.36
8.1.100.0030.00317.30
8.1.90.0050.00217.42
8.1.80.0030.00517.36
8.1.70.0000.00817.46
8.1.60.0040.00417.51
8.1.50.0050.00217.55
8.1.40.0040.00417.42
8.1.30.0040.00417.43
8.1.20.0000.00817.54
8.1.10.0000.00717.50
8.1.00.0080.00017.46
8.0.300.0040.00418.77
8.0.290.0040.00417.16
8.0.280.0070.00018.49
8.0.270.0030.00317.17
8.0.260.0030.00317.14
8.0.250.0030.00317.02
8.0.240.0030.00516.97
8.0.230.0000.00716.96
8.0.220.0030.00316.88
8.0.210.0070.00016.95
8.0.200.0040.00416.96
8.0.190.0050.00316.98
8.0.180.0050.00216.87
8.0.170.0030.00516.82
8.0.160.0000.00816.83
8.0.150.0070.00016.72
8.0.140.0050.00316.87
8.0.130.0000.00713.30
8.0.120.0040.00416.87
8.0.110.0040.00416.72
8.0.100.0060.00316.92
8.0.90.0000.00816.95
8.0.80.0030.01316.92
8.0.70.0000.00816.84
8.0.60.0040.00416.85
8.0.50.0000.00716.73
8.0.30.0170.00717.08
8.0.20.0050.01317.40
8.0.10.0050.00217.06
8.0.00.0100.00716.87
7.4.330.0050.00015.00
7.4.320.0040.00416.50
7.4.300.0030.00316.55
7.4.290.0000.00716.53
7.4.280.0000.00716.58
7.4.270.0000.00716.50
7.4.260.0030.00316.61
7.4.250.0000.00716.45
7.4.240.0040.00416.51
7.4.230.0000.00716.50
7.4.220.0140.00516.43
7.4.210.0030.01116.58
7.4.200.0040.00416.63
7.4.190.0030.00316.71
7.4.160.0100.00716.63
7.4.150.0060.01217.40
7.4.140.0070.01517.86
7.4.130.0100.00816.59
7.4.120.0060.01216.56
7.4.110.0090.01016.43
7.4.100.0090.00916.38
7.4.90.0090.00916.39
7.4.80.0110.00819.39
7.4.70.0070.01016.62
7.4.60.0120.00616.38
7.4.50.0000.00816.41
7.4.40.0040.01216.46
7.4.30.0100.00716.59
7.4.00.0070.01014.92
7.3.330.0000.00513.19
7.3.320.0030.00313.32
7.3.310.0030.00316.24
7.3.300.0040.00416.33
7.3.290.0060.00916.34
7.3.280.0060.01016.32
7.3.270.0110.00817.40
7.3.260.0100.00916.49
7.3.250.0110.00816.46
7.3.240.0080.00916.43
7.3.230.0090.00916.61
7.3.210.0080.00816.51
7.3.200.0220.01419.39
7.3.190.0090.01316.32
7.3.180.0090.00616.53
7.3.170.0040.01116.55
7.3.160.0070.01116.34
7.3.120.0040.00814.87
7.2.330.0090.00916.57
7.2.320.0110.00716.74
7.2.310.0120.01016.48
7.2.300.0040.01416.79
7.2.290.0130.00316.59
7.2.00.0110.00619.40
7.1.100.0130.01016.43
7.1.70.0000.01017.08
7.1.60.0160.00919.46
7.1.50.0090.01517.01
7.1.00.0070.07022.40
7.0.200.0030.00716.93
7.0.140.0000.07721.90
7.0.60.0130.08020.00
7.0.50.0100.06017.85
7.0.40.0100.08319.96
7.0.30.0300.04720.25
7.0.20.0370.07020.23
7.0.10.0030.04720.22
7.0.00.0100.05020.23
5.6.280.0030.07321.07
5.6.210.0100.07320.73
5.6.200.0000.06018.12
5.6.190.0170.04720.64
5.6.180.0200.05020.40
5.6.170.0330.07320.71
5.6.160.0100.08320.71
5.6.150.0070.04018.16
5.6.140.0070.05718.17
5.6.130.0070.08318.18
5.6.120.0030.05721.15
5.6.110.0130.06021.11
5.6.100.0130.08020.93
5.6.90.0100.03720.98
5.6.80.0100.03320.45
5.5.350.0370.07020.43
5.5.340.0000.08318.07
5.5.330.0070.05720.43
5.5.320.0230.05320.28
5.5.310.0300.07720.24
5.5.300.0070.04018.07
5.5.290.0070.04018.02
5.5.280.0000.04320.80
5.5.270.0000.04320.64
5.5.260.0070.08320.77
5.5.250.0170.05020.58
5.5.240.0170.08020.26
5.4.450.0170.07019.48
5.4.440.0300.05019.58
5.4.430.0130.05319.70
5.4.420.0070.06319.61
5.4.410.0170.05019.21
5.4.400.0170.04719.31
5.4.390.0200.04719.08
5.4.380.0200.06718.73
5.4.370.0300.05018.84
5.4.360.0500.05018.51
5.4.350.0470.06718.78
5.4.340.0370.05318.70
5.4.320.0060.03612.50
5.4.310.0070.04212.50
5.4.300.0080.03512.50
5.4.290.0160.09912.48
5.4.280.0130.07112.38
5.4.270.0060.05612.38
5.4.260.0080.04512.38
5.4.250.0120.06712.38
5.4.240.0130.05812.38
5.4.230.0140.05012.37
5.4.220.0100.06012.38
5.4.210.0160.04912.37
5.4.200.0090.04112.37
5.4.190.0070.04012.37
5.4.180.0080.05412.36
5.4.170.0160.04812.38
5.4.160.0110.04812.38
5.4.150.0120.04712.37
5.4.140.0080.03812.05
5.4.130.0080.03512.05
5.4.120.0060.03712.00
5.4.110.0030.04012.00
5.4.100.0090.04312.00
5.4.90.0090.05212.00
5.4.80.0150.06811.99
5.4.70.0060.04211.99
5.4.60.0080.05011.99
5.4.50.0070.03611.99
5.4.40.0130.04211.98
5.4.30.0140.04611.98
5.4.20.0130.07811.98
5.4.10.0090.03511.98
5.4.00.0110.05211.47
5.3.290.0060.03812.80
5.3.280.0150.04912.71
5.3.270.0110.05612.72
5.3.260.0110.05112.72
5.3.250.0100.05012.72
5.3.240.0080.04312.72
5.3.230.0090.04012.71
5.3.220.0110.03612.68
5.3.210.0080.04012.68
5.3.200.0090.05012.68
5.3.190.0100.04912.68
5.3.180.0050.04712.67
5.3.170.0080.05212.67
5.3.160.0070.05412.67
5.3.150.0140.04812.67
5.3.140.0110.05012.66
5.3.130.0160.06512.66
5.3.120.0170.06512.66
5.3.110.0060.05312.66
5.3.100.0110.05912.12
5.3.90.0130.06612.09
5.3.80.0090.04712.09
5.3.70.0070.04512.09
5.3.60.0050.05012.07
5.3.50.0050.03812.03
5.3.40.0110.03512.03
5.3.30.0080.03611.98
5.3.20.0090.05011.76
5.3.10.0090.05111.72
5.3.00.0080.06811.71
5.2.170.0190.0849.18
5.2.160.0200.0679.18
5.2.150.0320.0519.18
5.2.140.0110.0409.18
5.2.130.0050.0339.14
5.2.120.0100.0509.14
5.2.110.0070.0349.15
5.2.100.0090.0419.14
5.2.90.0120.0539.15
5.2.80.0100.0429.14
5.2.70.0070.0329.14
5.2.60.0150.0309.09
5.2.50.0070.0299.06
5.2.40.0070.0329.04
5.2.30.0070.0369.02
5.2.20.0050.0379.00
5.2.10.0100.0388.93
5.2.00.0080.0368.79
5.1.60.0090.0558.07
5.1.50.0030.0318.07
5.1.40.0050.0348.05
5.1.30.0060.0568.39
5.1.20.0110.0558.42
5.1.10.0060.0448.14
5.1.00.0060.0398.14
5.0.50.0090.0246.63
5.0.40.0030.0236.49
5.0.30.0050.0416.30
5.0.20.0020.0366.27
5.0.10.0170.0416.25
5.0.00.0080.0376.23
4.4.90.0050.0204.78
4.4.80.0040.0254.75
4.4.70.0040.0214.76
4.4.60.0070.0244.76
4.4.50.0050.0234.77
4.4.40.0050.0244.71
4.4.30.0030.0164.76
4.4.20.0050.0154.85
4.4.10.0050.0194.85
4.4.00.0050.0324.76
4.3.110.0040.0224.67
4.3.100.0040.0234.67
4.3.90.0040.0214.64
4.3.80.0100.0554.58
4.3.70.0060.0204.63
4.3.60.0030.0214.63
4.3.50.0020.0254.63
4.3.40.0030.0354.54
4.3.30.0060.0203.29
4.3.20.0040.0243.27
4.3.10.0020.0273.23
4.3.00.0070.0207.28

preferences:
37.19 ms | 401 KiB | 5 Q