3v4l.org

run code in 300+ PHP versions simultaneously
<?php $oses = array( 'Windows 95' => array('win95', 'windows 95'), 'Windows 98' => array('win98', 'windows 98'), 'Windows CE' => 'windows ce', 'Windows ME' => array('windows 9x 4.90', 'windows me'), 'Windows NT' => array('winnt4.0', 'windows nt 4.0'), 'Windows 2000' => array('winnt5.0', 'windows nt 5.0'), 'Windows XP' => array('winnt5.1', 'windows nt 5.1'), 'Windows 2003 Server' => 'windows nt 5.2', 'Windows Vista' => 'windows nt 6.0', 'Windows 7' => 'windows nt 6.1', 'Windows 8' => 'windows nt 6.2', 'Windows Unatended' => 'windows', 'iOS' => array('iphone', 'ipad', 'ipod'), 'Mac OS X 10.0' => 'mac os x 10.0', 'Mac OS X 10.1' => 'mac os x 10.1', 'Mac OS X 10.2' => 'mac os x 10.2', 'Mac OS X 10.3' => 'mac os x 10.3', 'Mac OS X 10.4' => 'mac os x 10.4', 'Mac OS X 10.5' => 'mac os x 10.5', 'Mac OS X 10.6' => 'mac os x 10.6', 'Mac OS X 10.7' => 'mac os x 10.7', 'Mac OS X 10.8' => 'mac os x 10.8', 'Mac OS X 10.9' => 'mac os x 10.9', 'Mac OS X' => 'mac os x', 'Macintosh' => array('powerpc', 'macintosh'), 'Android 5.x' => 'android 5', 'Android 4.x' => 'android 4', 'Android 3.x' => 'android 3', 'Android 2.x' => 'android 2', 'Android 1.x' => 'android 1', 'Android' => 'android', 'Linux' => 'linux', 'Free BSD' => 'freebsd', 'Net BSD' => 'netbsd', 'Open BSD' => 'openbsd', 'Sun OS' => 'sunos', 'Symbian' => 'symbian', 'Tapatalk' => 'tapatalk', ); #$useragent = strtolower('Mozilla/5.0 (iPad; CPU OS 5_1_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9B206 Safari/7534.48.3'); $useragent = strtolower('Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_1 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8B117 Safari/6531.22.7 (compatible; Googlebot-Mobile/2.1; +http://www.google.com/bot.html)'); #$useragent = strtolower('Mozilla/4.0 (compatible; MSIE 4.0; Windows 95; .NET CLR 1.1.4322; .NET CLR 2.0.50727'); foreach ($oses as $os => $identificator) { if (is_array($identificator)) { #user_error($useragent, E_USER_NOTICE); foreach ($identificator as $ident) { user_error($ident, E_USER_NOTICE); if (preg_match("#$ident#i", $useragent)) { user_error('FOUND!', E_USER_NOTICE); $browser['os'] = $os; break; } } } else { user_error($identificator, E_USER_NOTICE); if (preg_match("#$identificator#i", $useragent)) { $browser['os'] = $os; break; } } } user_error($browser['os'], E_USER_NOTICE); ?>

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.00716.88
8.3.50.0120.00816.62
8.3.40.0130.00319.21
8.3.30.0100.00619.09
8.3.20.0090.00919.01
8.3.10.0090.00019.16
8.3.00.0070.00319.63
8.2.180.0080.00817.00
8.2.170.0130.00922.96
8.2.160.0100.01019.26
8.2.150.0060.00324.18
8.2.140.0030.00624.66
8.2.130.0080.00026.16
8.2.120.0050.00321.06
8.2.110.0060.00621.17
8.2.100.0040.00818.16
8.2.90.0080.00019.22
8.2.80.0050.00317.97
8.2.70.0050.00317.88
8.2.60.0030.00617.93
8.2.50.0040.00418.10
8.2.40.0040.00418.16
8.2.30.0000.00818.29
8.2.20.0000.01017.87
8.2.10.0030.00617.98
8.2.00.0030.00517.99
8.1.280.0090.00625.92
8.1.270.0040.00423.99
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0090.00023.78
8.1.230.0040.00817.89
8.1.220.0040.00417.91
8.1.210.0080.00018.77
8.1.200.0060.00317.60
8.1.190.0060.00317.48
8.1.180.0090.00018.10
8.1.170.0000.00818.78
8.1.160.0030.00518.96
8.1.150.0040.00418.79
8.1.140.0000.00817.70
8.1.130.0030.00617.88
8.1.120.0040.00417.57
8.1.110.0040.00417.64
8.1.100.0020.00517.55
8.1.90.0050.00217.58
8.1.80.0050.00317.63
8.1.70.0040.00417.54
8.1.60.0090.00017.66
8.1.50.0040.00417.63
8.1.40.0050.00317.67
8.1.30.0030.00617.73
8.1.20.0080.00017.79
8.1.10.0000.00817.78
8.1.00.0000.00817.66
8.0.300.0040.00418.77
8.0.290.0000.00917.00
8.0.280.0040.00418.49
8.0.270.0030.00517.32
8.0.260.0000.00817.07
8.0.250.0030.00617.09
8.0.240.0040.00417.22
8.0.230.0000.00717.24
8.0.220.0040.00417.09
8.0.210.0000.00717.13
8.0.200.0000.00717.08
8.0.190.0000.00917.13
8.0.180.0030.00517.12
8.0.170.0050.00317.03
8.0.160.0000.00717.10
8.0.150.0040.00417.07
8.0.140.0030.00617.11
8.0.130.0030.00313.55
8.0.120.0030.00617.07
8.0.110.0040.00416.95
8.0.100.0000.00816.95
8.0.90.0060.00317.00
8.0.80.0100.00717.12
8.0.70.0060.00316.97
8.0.60.0030.00517.07
8.0.50.0050.00317.02
8.0.30.0120.00917.50
8.0.20.0110.00817.38
8.0.10.0000.00917.13
8.0.00.0140.00517.09
7.4.330.0060.00013.22
7.4.320.0000.00716.75
7.4.300.0070.00016.81
7.4.290.0080.00016.76
7.4.280.0000.00716.67
7.4.270.0070.00016.78
7.4.260.0060.00013.50
7.4.250.0060.00316.64
7.4.240.0000.00716.72
7.4.230.0070.00016.88
7.4.220.0130.01016.95
7.4.210.0160.00016.75
7.4.200.0000.00816.75
7.4.190.0000.00716.71
7.4.160.0170.00716.94
7.4.150.0120.00816.67
7.4.140.0040.01516.63
7.4.130.0100.01416.77
7.4.120.0110.00816.59
7.4.110.0130.01316.67
7.4.100.0060.01316.82
7.4.90.0080.01116.80
7.4.80.0160.01119.39
7.4.70.0130.00516.59
7.4.60.0080.00816.93
7.4.50.0030.00616.68
7.4.40.0120.00616.69
7.4.30.0070.01516.86
7.4.00.0030.01015.09
7.3.330.0030.00313.35
7.3.320.0050.00313.45
7.3.310.0040.00416.54
7.3.300.0070.00016.56
7.3.290.0110.00516.59
7.3.280.0090.00816.56
7.3.270.0000.02016.50
7.3.260.0100.01116.55
7.3.250.0120.01016.64
7.3.240.0140.00416.76
7.3.230.0190.00616.54
7.3.210.0100.00916.64
7.3.200.0030.01316.84
7.3.190.0130.01016.47
7.3.180.0100.00716.96
7.3.170.0100.00716.60
7.3.160.0060.01316.67
7.3.120.0040.01115.06
7.2.330.0090.00916.66
7.2.320.0030.01616.84
7.2.310.0030.02516.70
7.2.300.0150.00416.71
7.2.290.0190.00616.80
7.2.00.0100.00019.77
7.1.100.0030.01218.55
7.1.70.0000.00717.43
7.1.60.0120.01219.30
7.1.50.0000.02417.14
7.1.00.0000.06722.57
7.0.200.0100.00316.93
7.0.140.0100.07022.03
7.0.120.0070.06722.20
7.0.60.0100.08719.91
7.0.50.0070.05017.94
7.0.40.0070.08720.46
7.0.30.0230.05720.27
7.0.20.0200.03720.22
7.0.10.0400.09020.18
7.0.00.0030.05320.09
5.6.280.0070.07021.06
5.6.210.0130.07720.71
5.6.200.0130.08018.25
5.6.190.0100.04320.58
5.6.180.0030.05720.28
5.6.170.0370.04720.50
5.6.160.0130.07720.52
5.6.150.0030.04018.23
5.6.140.0100.07718.18
5.6.130.0030.07318.25
5.6.120.0070.08721.14
5.6.110.0170.06021.05
5.6.100.0100.06021.01
5.6.90.0130.07721.02
5.6.80.0130.04720.61
5.6.70.4030.04020.40
5.5.350.0130.07020.40
5.5.340.0100.07718.02
5.5.330.0130.06720.23
5.5.320.0370.03320.13
5.5.310.0270.07720.27
5.5.300.0030.04018.01
5.5.290.0100.06718.03
5.5.280.0070.06720.86
5.5.270.0130.08320.77
5.5.260.0070.09020.79
5.5.250.0030.04020.70
5.5.240.0030.08320.14
5.4.450.2170.03319.58
5.4.440.2470.04019.48
5.4.430.2570.04319.48
5.4.420.2530.03719.41
5.4.410.2570.03019.09
5.4.400.2530.03719.26
5.4.390.2630.03319.22
5.4.380.2630.03019.25
5.4.370.1230.03318.94
5.4.360.0100.03718.94
5.4.350.0000.04018.83
5.4.340.2830.04319.11
5.4.320.2230.03718.94
5.4.310.2500.04018.89
5.4.300.2800.03019.16
5.4.290.2370.04019.25
5.4.280.2430.03719.26
5.4.270.2500.03019.11
5.4.260.2230.03719.25
5.4.250.2270.03719.25
5.4.240.0030.03719.16
5.4.230.0000.04719.25
5.4.220.1030.04019.26
5.4.210.2130.03319.09
5.4.200.2100.04019.09
5.4.190.2470.03319.23
5.4.180.2500.04319.08
5.4.170.2330.03718.91
5.4.160.1870.03019.22
5.4.150.2400.04319.07
5.4.140.2800.04716.48
5.4.130.2400.03316.22
5.4.120.2770.03016.38
5.4.110.2700.03716.49
5.4.100.2700.03016.13
5.4.90.2470.02716.47
5.4.80.2730.03716.43
5.4.70.2470.03316.28
5.4.60.2700.03316.24
5.4.50.2430.03716.46
5.4.40.2630.03716.26
5.4.30.2700.03716.09
5.4.20.2400.04016.43
5.4.10.2630.04316.21
5.4.00.2700.04315.76
5.3.290.2400.04014.73
5.3.280.2600.04014.59
5.3.270.2530.04014.68
5.3.260.2400.04314.57
5.3.250.2630.04314.73
5.3.240.0300.05014.62
5.3.230.0330.06014.48
5.3.220.0200.05314.58
5.3.210.0130.04714.55
5.3.200.0170.05014.43
5.3.190.0230.06014.50
5.3.180.0300.03714.56
5.3.170.0230.03314.52
5.3.160.0230.07314.44
5.3.150.0300.06014.64
5.3.140.0230.05314.62
5.3.130.0300.05014.61
5.3.120.0200.07314.67
5.3.110.0330.06314.41
5.3.100.0200.03314.05
5.3.90.0230.05313.89
5.3.80.0230.04313.92
5.3.70.0200.06314.00
5.3.60.0170.04013.97
5.3.50.0170.03713.93
5.3.40.0330.06013.93
5.3.30.0200.03313.88
5.3.20.0230.02713.67
5.3.10.0130.03713.52
5.3.00.0230.06313.55
5.2.170.0170.03711.01
5.2.160.0130.04311.04
5.2.150.0270.02311.12
5.2.140.0200.06011.06
5.2.130.0100.03711.04
5.2.120.0230.04310.98
5.2.110.0270.05711.21
5.2.100.0130.04010.98
5.2.90.0170.02711.10
5.2.80.0170.02711.21
5.2.70.0200.05310.99
5.2.60.0170.05311.02
5.2.50.0170.03710.90
5.2.40.0130.02711.04
5.2.30.0130.04011.03
5.2.20.0100.03311.15
5.2.10.0130.03310.79
5.2.00.0130.02710.82
5.1.60.0100.02710.19
5.1.50.0100.03310.12
5.1.40.0100.0279.99
5.1.30.0170.04010.44
5.1.20.0170.05710.32
5.1.10.0100.03710.00
5.1.00.0070.03010.04
5.0.50.0030.0338.49
5.0.40.0130.0138.31
5.0.30.0100.0608.38
5.0.20.0100.0208.46
5.0.10.0130.0138.33
5.0.00.0070.0438.29
4.4.90.0100.0278.25
4.4.80.0030.0178.25
4.4.70.0070.0178.26
4.4.60.0100.0178.27
4.4.50.0100.0138.31
4.4.40.0070.0578.32
4.4.30.0070.0308.32
4.4.20.0070.0138.33
4.4.10.0070.0238.36
4.4.00.0100.0308.36
4.3.110.0030.0238.36
4.3.100.0100.0138.37
4.3.90.0030.0238.39
4.3.80.0030.0508.41
4.3.70.0070.0138.42
4.3.60.0070.0338.44
4.3.50.0070.0138.44
4.3.40.0100.0538.46
4.3.30.0000.0408.47
4.3.20.0000.0238.49
4.3.10.0030.0338.50
4.3.00.0030.0278.50

preferences:
59.76 ms | 401 KiB | 5 Q