3v4l.org

run code in 300+ PHP versions simultaneously
<?php function BinSearch($needle, $haystack){ $midpoint = count($haystack) / 2; $lower_half = array_slice($haystack, 0, $midpoint); $upper_half = array_slice($haystack, -$midpoint, count($haystack)); if($needle < $midpoint){ BinSearch($needle, $lower_half); } else if($needle > $midpoint){ BinSearch($needle, $upper_half); } } $x = range(0,99); BinSearch(73,$x);

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.0140.02318.19
8.3.50.0330.00816.80
8.3.40.0300.01018.76
8.3.30.0240.01818.88
8.3.20.0120.01222.05
8.3.10.0260.00021.98
8.3.00.0200.00022.03
8.2.180.0270.01516.63
8.2.170.0210.01219.09
8.2.160.0340.01322.96
8.2.150.0120.00425.66
8.2.140.0200.01424.66
8.2.130.0120.00426.16
8.2.120.0220.01121.07
8.2.110.0080.01220.94
8.2.100.0230.00418.16
8.2.90.0060.00318.00
8.2.80.0120.00018.98
8.2.70.0080.00417.50
8.2.60.0080.00417.75
8.2.50.0060.00317.88
8.2.40.0080.00317.88
8.2.30.0160.00020.78
8.2.20.0100.00518.46
8.2.10.0000.01219.47
8.2.00.0180.00018.44
8.1.280.0240.02025.92
8.1.270.0080.00820.63
8.1.260.0040.00426.35
8.1.250.0230.01128.09
8.1.240.0060.01823.88
8.1.230.0220.00222.62
8.1.220.0050.00518.81
8.1.210.0080.00818.77
8.1.200.0070.00717.60
8.1.190.0070.00417.60
8.1.180.0100.00718.10
8.1.170.0040.00818.03
8.1.160.0030.00719.27
8.1.150.0000.01119.34
8.1.140.0070.00719.29
8.1.130.0040.00720.66
8.1.120.0040.00717.74
8.1.110.0060.01117.84
8.1.100.0080.00817.82
8.1.90.0040.00817.84
8.1.80.0050.00517.89
8.1.70.0100.01017.72
8.1.60.0100.01018.05
8.1.50.0000.00817.73
8.1.40.0100.00517.89
8.1.30.0030.00918.00
8.1.20.0000.00818.02
8.1.10.0070.00317.86
8.1.00.0060.00617.52
8.0.300.0330.01779.75
8.0.290.0210.01779.75
8.0.280.0170.02381.36
8.0.270.0360.01380.16
8.0.260.0260.02281.44
8.0.250.0230.02379.78
8.0.240.0200.01779.95
8.0.230.0360.01379.92
8.0.220.0350.01779.88
8.0.210.0200.02079.79
8.0.200.0340.01079.88
8.0.190.0250.01979.86
8.0.180.0270.01379.90
8.0.170.0270.01479.90
8.0.160.0220.02279.90
8.0.150.0300.03079.68
8.0.140.0130.03079.82
8.0.130.0950.033136.15
8.0.120.0310.01479.88
8.0.110.0340.00779.84
8.0.100.0270.01479.70
8.0.90.0370.00379.93
8.0.80.0570.05479.78
8.0.70.0190.01979.85
8.0.60.0140.02479.94
8.0.50.0230.01779.94
8.0.30.0540.03379.92
8.0.20.0560.05280.02
8.0.10.0140.02879.78
8.0.00.0640.04879.56
7.4.330.0370.01377.99
7.4.320.0300.00779.50
7.4.300.0240.02479.45
7.4.290.0300.01379.57
7.4.280.0410.04179.43
7.4.270.0310.01479.43
7.4.260.0340.01779.41
7.4.250.0250.02179.39
7.4.240.0210.01779.44
7.4.230.0170.02379.27
7.4.220.0310.01079.55
7.4.210.0590.04579.46
7.4.200.0220.01979.60
7.4.160.0700.04879.43
7.4.140.0560.05379.61
7.4.130.0750.04179.39
7.4.120.0840.04779.49
7.4.110.0540.04779.45
7.4.100.0710.03879.59
7.4.90.0580.05179.45
7.4.80.0700.07379.52
7.4.70.0830.03779.54
7.4.60.0840.04779.38
7.4.50.0290.03679.16
7.4.40.0560.05679.27
7.4.00.0360.03677.77
7.3.330.0380.027135.88
7.3.320.0700.037136.10
7.3.310.0210.01779.28
7.3.300.0270.01479.26
7.3.290.0340.05879.35
7.3.280.1400.05877.91
7.3.260.0680.04379.44
7.3.240.0730.04279.48
7.3.230.0490.05279.45
7.3.210.0690.04379.41
7.3.200.0810.06179.52
7.3.190.0570.05079.39
7.3.180.0470.06679.43
7.3.170.0710.03579.43
7.3.160.0570.05179.46
7.3.40.0530.03377.68
7.3.30.0550.02877.46
7.3.20.4970.02077.91
7.3.10.5720.04277.85
7.3.00.1090.02078.46
7.2.330.0760.04080.23
7.2.320.0680.04280.25
7.2.310.0790.02380.21
7.2.300.0680.04880.32
7.2.290.0840.04880.25
7.2.170.0420.03278.61
7.2.160.0470.02778.66
7.2.150.4350.03078.70
7.2.140.4930.03078.37
7.2.130.0670.02878.83
7.2.120.0590.03778.45
7.2.110.0800.01978.70
7.2.100.0510.03878.50
7.2.90.0630.03078.44
7.2.80.0430.04278.65
7.2.70.0460.03278.73
7.2.60.0480.02978.70
7.2.50.0890.04678.63
7.2.40.0760.01378.50
7.2.30.0620.02578.73
7.2.20.0510.02578.66
7.2.10.0500.02278.57
7.2.00.0560.01778.51
7.1.280.4980.03677.58
7.1.270.4000.03677.56
7.1.260.3880.02777.87
7.1.250.0590.02877.39

preferences:
84.58 ms | 401 KiB | 5 Q