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, 4,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.00918.56
8.3.50.0130.00523.07
8.3.40.0150.00019.00
8.3.30.0110.00419.21
8.3.20.0000.00820.21
8.3.10.0040.00423.71
8.3.00.0000.00819.50
8.2.180.0100.00718.42
8.2.170.0070.00722.96
8.2.160.0110.00320.44
8.2.150.0030.00524.18
8.2.140.0030.00524.66
8.2.130.0000.00826.16
8.2.120.0030.00620.90
8.2.110.0070.00320.53
8.2.100.0000.01117.91
8.2.90.0000.00819.21
8.2.80.0000.00817.97
8.2.70.0060.00317.75
8.2.60.0040.00418.16
8.2.50.0000.00918.07
8.2.40.0040.00418.34
8.2.30.0030.00518.17
8.2.20.0040.00418.09
8.2.10.0040.00418.17
8.2.00.0030.00617.91
8.1.280.0140.00725.92
8.1.270.0080.00023.84
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0140.00723.54
8.1.230.0040.00722.00
8.1.220.0000.00817.79
8.1.210.0080.00018.77
8.1.200.0070.00417.47
8.1.190.0040.00417.47
8.1.180.0040.00418.10
8.1.170.0050.00318.73
8.1.160.0040.00422.04
8.1.150.0000.00718.98
8.1.140.0000.00817.62
8.1.130.0000.00717.87
8.1.120.0000.00717.71
8.1.110.0050.00317.62
8.1.100.0040.00417.58
8.1.90.0040.00417.66
8.1.80.0000.00817.53
8.1.70.0040.00417.52
8.1.60.0030.00617.75
8.1.50.0030.00617.71
8.1.40.0000.00917.52
8.1.30.0000.00817.85
8.1.20.0040.00417.80
8.1.10.0000.00817.76
8.1.00.0040.00417.67
8.0.300.0000.00718.77
8.0.290.0040.00416.88
8.0.280.0080.00018.43
8.0.270.0040.00417.30
8.0.260.0000.00817.17
8.0.250.0030.00317.06
8.0.240.0040.00416.99
8.0.230.0040.00417.13
8.0.220.0050.00217.03
8.0.210.0000.00717.02
8.0.200.0000.00817.11
8.0.190.0070.00017.01
8.0.180.0000.00716.97
8.0.170.0000.00817.08
8.0.160.0030.00516.99
8.0.150.0000.00716.96
8.0.140.0040.00417.10
8.0.130.0030.00313.44
8.0.120.0000.00817.00
8.0.110.0000.00717.05
8.0.100.0040.00417.12
8.0.90.0000.00717.00
8.0.80.0080.00817.07
8.0.70.0000.00817.15
8.0.60.0040.00417.14
8.0.50.0050.00317.00
8.0.30.0100.01017.38
8.0.20.0160.00717.45
8.0.10.0000.00717.18
8.0.00.0120.00816.96
7.4.330.0060.00015.16
7.4.320.0030.00316.66
7.4.300.0030.00316.74
7.4.290.0030.00316.75
7.4.280.0070.00016.74
7.4.270.0030.00316.74
7.4.260.0050.00316.71
7.4.250.0040.00416.69
7.4.240.0070.00016.79
7.4.230.0040.00416.63
7.4.220.0160.00316.70
7.4.210.0070.00816.77
7.4.200.0030.00316.65
7.4.160.0100.00616.69
7.4.150.0060.01717.40
7.4.140.0130.00517.86
7.4.130.0110.00616.82
7.4.120.0100.00716.70
7.4.110.0070.01116.54
7.4.100.0110.00616.80
7.4.90.0060.01216.62
7.4.80.0060.01219.39
7.4.70.0150.00616.74
7.4.60.0030.01316.66
7.4.50.0030.00516.63
7.4.40.0060.01116.76
7.4.30.0060.01116.85
7.4.00.0070.01115.02
7.3.330.0000.00613.49
7.3.320.0030.00313.54
7.3.310.0030.00316.53
7.3.300.0040.00416.41
7.3.290.0070.01016.54
7.3.280.0100.00716.54
7.3.270.0100.01017.40
7.3.260.0130.01016.82
7.3.250.0110.00616.68
7.3.240.0090.01216.91
7.3.230.0140.00316.60
7.3.210.0100.00716.71
7.3.200.0130.00319.39
7.3.190.0140.00716.80
7.3.180.0070.01116.62
7.3.170.0110.00616.82
7.3.160.0060.01016.64
7.2.330.0030.01316.82
7.2.320.0130.00416.95
7.2.310.0140.00716.88
7.2.300.0140.00716.71
7.2.290.0030.01316.99
7.2.00.0030.01019.82
7.1.100.0030.01018.46
7.1.70.0000.00817.37
7.1.60.0040.01119.46
7.1.50.0100.00717.23
7.1.00.0000.07722.56
7.0.200.0040.00416.62
7.0.140.0100.06721.95
7.0.60.0030.06320.09
7.0.50.0000.06017.77
7.0.40.0100.08720.40
7.0.30.0330.07320.25
7.0.20.0200.07020.23
7.0.10.0000.08020.04
7.0.00.0100.08320.16
5.6.280.0100.06720.80
5.6.210.0030.08020.63
5.6.200.0100.07718.13
5.6.190.0070.06720.55
5.6.180.0170.04320.64
5.6.170.0130.04320.50
5.6.160.0170.07720.57
5.6.150.0030.05718.15
5.6.140.0130.04318.28
5.6.130.0000.04318.28
5.6.120.0100.08020.90
5.6.110.0170.05720.97
5.6.100.0070.04021.12
5.6.90.0070.06321.00
5.6.80.0100.07720.30
5.6.70.4400.04320.41
5.5.350.0100.07020.45
5.5.340.0030.07017.99
5.5.330.0070.04020.27
5.5.320.0030.05020.34
5.5.310.0200.04020.27
5.5.300.0100.04318.07
5.5.290.0100.08017.98
5.5.280.0130.06020.73
5.5.270.0130.08020.88
5.5.260.0030.05720.80
5.5.250.0070.08020.70
5.5.240.0330.06020.29
5.4.450.0630.03319.57
5.4.440.0300.05319.46
5.4.430.0600.03719.19
5.4.420.0200.03019.27
5.4.410.0100.04719.15
5.4.400.0070.04319.12
5.4.390.0100.04719.13
5.4.380.0430.05318.45
5.4.370.0230.06718.63
5.4.360.0300.05318.73
5.4.350.0300.06318.77
5.4.340.0400.05018.61
5.4.320.0060.03812.50
5.4.310.0060.03812.50
5.4.300.0070.03612.51
5.4.290.0060.04312.50
5.4.280.0040.04012.40
5.4.270.0080.03712.40
5.4.260.0120.04212.40
5.4.250.0060.04912.40
5.4.240.0090.03412.40
5.4.230.0050.04612.39
5.4.220.0070.03712.39
5.4.210.0080.03412.39
5.4.200.0090.05112.40
5.4.190.0090.04012.39
5.4.180.0060.03612.39
5.4.170.0070.03612.40
5.4.160.0050.03712.39
5.4.150.0080.04212.39
5.4.140.0070.04012.07
5.4.130.0050.03512.07
5.4.120.0080.04512.02
5.4.110.0070.04912.01
5.4.100.0080.04012.02
5.4.90.0090.04612.02
5.4.80.0070.03812.02
5.4.70.0080.03912.01
5.4.60.0050.03612.01
5.4.50.0060.04212.02
5.4.40.0090.04412.00
5.4.30.0100.03812.00
5.4.20.0100.03212.00
5.4.10.0080.03612.00
5.4.00.0010.04111.48
5.3.290.0090.03712.80
5.3.280.0090.03512.71
5.3.270.0110.04612.72
5.3.260.0090.04712.72
5.3.250.0080.04912.72
5.3.240.0070.04012.72
5.3.230.0060.03912.70
5.3.220.0070.04612.68
5.3.210.0060.03912.68
5.3.200.0060.04912.68
5.3.190.0080.04012.67
5.3.180.0120.03212.68
5.3.170.0070.03712.67
5.3.160.0130.04512.67
5.3.150.0110.04812.67
5.3.140.0090.03412.66
5.3.130.0060.03912.65
5.3.120.0080.03712.66
5.3.110.0090.03612.66
5.3.100.0070.03512.14
5.3.90.0110.04312.12
5.3.80.0080.04112.11
5.3.70.0110.04912.11
5.3.60.0070.04412.10
5.3.50.0070.04812.04
5.3.40.0070.03712.04
5.3.30.0070.03912.00
5.3.20.0070.03911.78
5.3.10.0090.03411.75
5.3.00.0090.04311.74
5.2.170.0070.0359.24
5.2.160.0060.0359.24
5.2.150.0060.0299.23
5.2.140.0060.0339.23
5.2.130.0060.0289.20
5.2.120.0030.0309.19
5.2.110.0050.0299.20
5.2.100.0050.0289.20
5.2.90.0050.0299.20
5.2.80.0070.0319.19
5.2.70.0070.0349.19
5.2.60.0090.0359.16
5.2.50.0050.0309.12
5.2.40.0040.0319.11
5.2.30.0050.0309.07
5.2.20.0060.0309.06
5.2.10.0050.0298.96
5.2.00.0050.0428.83
5.1.60.0060.0408.11
5.1.50.0040.0418.11
5.1.40.0080.0318.08
5.1.30.0090.0318.43
5.1.20.0030.0338.45
5.1.10.0090.0338.19
5.1.00.0050.0318.19
5.0.50.0060.0346.67
5.0.40.0070.0276.54
5.0.30.0040.0326.34
5.0.20.0050.0286.30
5.0.10.0050.0226.29
5.0.00.0040.0326.28
4.4.90.0020.0164.78
4.4.80.0030.0154.75
4.4.70.0040.0224.76
4.4.60.0060.0134.76
4.4.50.0030.0334.77
4.4.40.0040.0344.71
4.4.30.0030.0224.76
4.4.20.0030.0154.84
4.4.10.0030.0164.85
4.4.00.0060.0254.75
4.3.110.0060.0274.67
4.3.100.0040.0164.66
4.3.90.0060.0214.63
4.3.80.0050.0344.58
4.3.70.0010.0164.63
4.3.60.0000.0294.63
4.3.50.0040.0164.63
4.3.40.0070.0324.53
4.3.30.0030.0363.34
4.3.20.0030.0153.31
4.3.10.0010.0223.27
4.3.00.0000.02014.87

preferences:
47.17 ms | 401 KiB | 5 Q