3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ua = 'Mozilla/5.0 (Linux; Android 4.0; Galaxy Nexus Build/IMM76B) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.133 Mobile Safari/535.19'; $pattern = "/Android (\d).(\d)(?:.(\d))?/"; preg_match($pattern, $ua, $matches); $androidversion = array(0,0,0); if (sizeof($matches) == 0 ) { error_log("No Android version match");}if (sizeof($matches) == 1) { error_log("No major version");} if (sizeof($matches) >= 2) { $androidversion[0] = $matches[1];}if (sizeof($matches) >=3) { $androidversion[1] = $matches[2];}if (sizeof($matches) >= 4) { $androidversion[2] = $matches[3];}function isAndroidVersion($androidversiontocheck, $major, $mid, $minor){ if ($androidversiontocheck[0] == $major and $androidversiontocheck[1] == $mid and $androidversiontocheck[2] == $minor){ return True; } return False;}function isEqualorGreaterAndroidVersion($androidversiontocheck, $major, $mid, $minor){ if ($androidversiontocheck[0] < $major){ return False; }else if ($androidversiontocheck[1] < $mid){ return False; }else if ($androidversiontocheck[2] < $minor){ return False; }else{ return True; }}print (isEqualorGreaterAndroidVersion($androidversion, 3,0,1));print_r($androidversion);

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.0090.00916.75
8.3.50.0110.00922.80
8.3.40.0120.00919.09
8.3.30.0040.01119.25
8.3.20.0070.00020.33
8.3.10.0050.00323.70
8.3.00.0030.00619.63
8.2.180.0120.00616.75
8.2.170.0120.00922.96
8.2.160.0100.00320.52
8.2.150.0080.00024.18
8.2.140.0090.00024.66
8.2.130.0040.00426.16
8.2.120.0050.00321.10
8.2.110.0030.00620.48
8.2.100.0090.00318.03
8.2.90.0000.00819.09
8.2.80.0050.00317.97
8.2.70.0030.00717.88
8.2.60.0030.00518.04
8.2.50.0030.00618.07
8.2.40.0040.00418.28
8.2.30.0050.00318.12
8.2.20.0000.00817.77
8.2.10.0040.00418.12
8.2.00.0050.00317.91
8.1.280.0120.00925.92
8.1.270.0030.00523.84
8.1.260.0070.00026.35
8.1.250.0020.00528.09
8.1.240.0100.00019.02
8.1.230.0070.00419.09
8.1.220.0030.00617.77
8.1.210.0030.00618.77
8.1.200.0060.00617.60
8.1.190.0000.00917.38
8.1.180.0050.00318.10
8.1.170.0030.00518.63
8.1.160.0040.00422.07
8.1.150.0030.00518.95
8.1.140.0040.00417.52
8.1.130.0040.00417.79
8.1.120.0070.00017.63
8.1.110.0000.00717.65
8.1.100.0040.00417.63
8.1.90.0040.00417.66
8.1.80.0000.00817.61
8.1.70.0000.00717.63
8.1.60.0040.00417.73
8.1.50.0050.00317.72
8.1.40.0000.00717.64
8.1.30.0040.00417.79
8.1.20.0050.00317.74
8.1.10.0050.00317.73
8.1.00.0050.00317.59
8.0.300.0040.00418.77
8.0.290.0000.00916.75
8.0.280.0030.00318.36
8.0.270.0040.00417.30
8.0.260.0030.00317.17
8.0.250.0000.00717.16
8.0.240.0040.00417.14
8.0.230.0040.00417.05
8.0.220.0030.00316.94
8.0.210.0000.00716.93
8.0.200.0000.00816.99
8.0.190.0040.00417.13
8.0.180.0040.00416.99
8.0.170.0000.00816.98
8.0.160.0050.00217.10
8.0.150.0040.00416.97
8.0.140.0050.00316.98
8.0.130.0030.00313.55
8.0.120.0030.00517.07
8.0.110.0040.00417.09
8.0.100.0070.00017.00
8.0.90.0040.00417.06
8.0.80.0130.01016.93
8.0.70.0000.00717.13
8.0.60.0020.00516.93
8.0.50.0070.00017.00
8.0.30.0090.01117.30
8.0.20.0120.01117.40
8.0.10.0070.00017.17
8.0.00.0070.01117.04
7.4.330.0050.00015.10
7.4.320.0030.00316.64
7.4.300.0030.00316.70
7.4.290.0070.00016.88
7.4.280.0030.00516.87
7.4.270.0060.00016.84
7.4.260.0070.00316.69
7.4.250.0000.00816.72
7.4.240.0040.00416.81
7.4.230.0000.00716.77
7.4.220.0080.01316.81
7.4.210.0090.00616.80
7.4.200.0070.00016.79
7.4.160.0030.01316.83
7.4.150.0110.01117.40
7.4.140.0120.00717.86
7.4.130.0050.01316.79
7.4.120.0110.00716.78
7.4.110.0070.01016.85
7.4.100.0140.00416.81
7.4.90.0090.00916.79
7.4.80.0070.01119.39
7.4.70.0030.01516.84
7.4.60.0070.01016.85
7.4.50.0080.00016.84
7.4.40.0090.00916.60
7.4.30.0130.00416.70
7.4.00.0150.00015.00
7.3.330.0030.00313.54
7.3.320.0000.00513.36
7.3.310.0030.00316.54
7.3.300.0070.00016.42
7.3.290.0070.01016.52
7.3.280.0080.00816.54
7.3.270.0140.01017.40
7.3.260.0130.01016.77
7.3.250.0120.00416.78
7.3.240.0100.00616.52
7.3.230.0120.00616.93
7.3.210.0100.00716.75
7.3.200.0060.01519.39
7.3.190.0070.01116.68
7.3.180.0070.01016.89
7.3.170.0000.01616.63
7.3.160.0100.00716.68
7.2.330.0110.00616.72
7.2.320.0160.00316.64
7.2.310.0130.01317.09
7.2.300.0070.01016.78
7.2.290.0120.00616.63
7.2.00.0060.00619.79
7.1.100.0030.01218.44
7.1.70.0000.00717.40
7.1.60.0100.00319.46
7.1.50.0150.01216.89
7.1.00.0100.07022.46
7.0.200.0030.00616.62
7.0.140.0100.06722.10
7.0.60.0130.07319.95
7.0.50.0070.08317.97
7.0.40.0100.08320.23
7.0.30.0270.04320.08
7.0.20.0130.06720.11
7.0.10.0230.07020.20
7.0.00.0070.08020.30
5.6.280.0100.06721.11
5.6.210.0030.04020.46
5.6.200.0100.06718.25
5.6.190.0070.04720.61
5.6.180.0330.06320.33
5.6.170.0230.06720.47
5.6.160.0070.08020.47
5.6.150.0030.04318.18
5.6.140.0070.08318.18
5.6.130.0130.04318.18
5.6.120.0070.07321.02
5.6.110.0100.08020.89
5.6.100.0000.07020.98
5.6.90.0130.06721.01
5.6.80.0130.07320.54
5.5.350.0170.06020.53
5.5.340.0100.05317.93
5.5.330.0030.05020.27
5.5.320.0270.07720.20
5.5.310.0300.07020.25
5.5.300.0070.04717.95
5.5.290.0070.10318.04
5.5.280.0230.06720.64
5.5.270.0170.06020.78
5.5.260.0030.04020.73
5.5.250.0070.07020.80
5.5.240.0170.05720.20
5.4.450.0500.04319.48
5.4.440.0630.04719.42
5.4.430.0200.03719.30
5.4.420.0170.04019.41
5.4.410.0070.04319.19
5.4.400.0130.03719.32
5.4.390.0270.03019.00
5.4.380.0430.04718.73
5.4.370.0470.05318.78
5.4.360.0470.05018.61
5.4.350.0370.07718.78
5.4.340.0470.07718.83
5.4.320.0040.04412.51
5.4.310.0140.04112.50
5.4.300.0080.04612.51
5.4.290.0060.04412.50
5.4.280.0030.03812.40
5.4.270.0100.03912.40
5.4.260.0060.04812.40
5.4.250.0090.05612.40
5.4.240.0080.04312.40
5.4.230.0050.04112.39
5.4.220.0100.04712.39
5.4.210.0100.05312.39
5.4.200.0090.04012.40
5.4.190.0110.04712.39
5.4.180.0050.04312.39
5.4.170.0090.03912.40
5.4.160.0090.04412.40
5.4.150.0060.03612.39
5.4.140.0080.04412.07
5.4.130.0080.03312.06
5.4.120.0070.03712.02
5.4.110.0070.03412.02
5.4.100.0050.03612.02
5.4.90.0070.03612.02
5.4.80.0070.03612.02
5.4.70.0100.03912.02
5.4.60.0070.03412.01
5.4.50.0080.03312.01
5.4.40.0070.03312.00
5.4.30.0050.03612.00
5.4.20.0050.03612.00
5.4.10.0050.03511.99
5.4.00.0060.03611.48
5.3.290.0060.04012.80
5.3.280.0100.03412.71
5.3.270.0060.04012.72
5.3.260.0080.04712.71
5.3.250.0100.04512.71
5.3.240.0020.04212.72
5.3.230.0090.03712.70
5.3.220.0100.03812.68
5.3.210.0080.04012.68
5.3.200.0060.03612.68
5.3.190.0060.04012.68
5.3.180.0120.04512.67
5.3.170.0040.04412.67
5.3.160.0080.04612.67
5.3.150.0110.03712.67
5.3.140.0100.03812.66
5.3.130.0110.03612.66
5.3.120.0080.05512.66
5.3.110.0090.05812.66
5.3.100.0080.05012.14
5.3.90.0080.04112.12
5.3.80.0050.03712.11
5.3.70.0040.03812.11
5.3.60.0090.03412.10
5.3.50.0110.03312.04
5.3.40.0100.03412.04
5.3.30.0110.04212.00
5.3.20.0080.04711.79
5.3.10.0070.04811.75
5.3.00.0120.03911.73
5.2.170.0090.0309.24
5.2.160.0050.0299.23
5.2.150.0060.0299.23
5.2.140.0070.0319.23
5.2.130.0090.0259.20
5.2.120.0060.0279.20
5.2.110.0050.0299.20
5.2.100.0060.0379.20
5.2.90.0070.0379.20
5.2.80.0040.0349.20
5.2.70.0090.0329.19
5.2.60.0050.0339.15
5.2.50.0100.0489.13
5.2.40.0090.0319.11
5.2.30.0040.0359.07
5.2.20.0080.0359.06
5.2.10.0060.0268.96
5.2.00.0070.0328.82
5.1.60.0060.0288.12
5.1.50.0040.0298.11
5.1.40.0080.0328.09
5.1.30.0050.0338.44
5.1.20.0100.0318.46
5.1.10.0100.0328.19
5.1.00.0050.0368.19
5.0.50.0080.0316.67
5.0.40.0060.0306.53
5.0.30.0040.0336.34
5.0.20.0050.0196.30
5.0.10.0020.0256.29
5.0.00.0040.0306.28
4.4.90.0040.0224.78
4.4.80.0040.0284.75
4.4.70.0060.0244.75
4.4.60.0070.0124.75
4.4.50.0050.0144.77
4.4.40.0030.0254.71
4.4.30.0060.0304.76
4.4.20.0060.0274.84
4.4.10.0060.0204.85
4.4.00.0050.0344.76
4.3.110.0030.0174.67
4.3.100.0030.0174.66
4.3.90.0040.0224.64
4.3.80.0040.0254.59
4.3.70.0030.0164.63
4.3.60.0030.0214.63
4.3.50.0030.0184.63
4.3.40.0060.0214.54
4.3.30.0020.0163.34
4.3.20.0030.0153.31
4.3.10.0000.0183.27
4.3.00.0000.01714.87

preferences:
44.92 ms | 401 KiB | 5 Q