3v4l.org

run code in 300+ PHP versions simultaneously
<?php $oses = array( 'Windows 8' => 'windows nt 6.2', 'Windows 7' => 'windows nt 6.1', 'Windows Vista' => 'windows nt 6.0', 'Windows XP' => array('winnt5.1', 'windows nt 5.1'), 'Windows 2000' => array('winnt5.0', 'windows nt 5.0'), 'Windows NT' => array('winnt4.0', 'windows nt 4.0'), 'Windows 95' => array('win95', 'windows 95'), 'Windows 98' => array('win98', 'windows 98'), 'Windows 2003 Server' => 'windows nt 5.2', 'Windows CE' => 'windows ce', 'Windows ME' => array('windows 9x 4.90', 'windows me'), 'Windows Unatended' => 'windows', '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'), 'iOS' => array('iphone', 'ipad', 'ipod'), '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/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('is string', 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.70.0130.00616.75
8.3.60.0150.00018.65
8.3.50.0070.01222.12
8.3.40.0120.00318.98
8.3.30.0200.00018.93
8.3.20.0100.00720.30
8.3.10.0120.00422.09
8.3.00.0080.00322.40
8.2.190.0080.00816.88
8.2.180.0150.00317.00
8.2.170.0120.00922.96
8.2.160.0040.01121.02
8.2.150.0130.00624.18
8.2.140.0180.00324.66
8.2.130.0070.00726.16
8.2.120.0120.00419.48
8.2.110.0070.00322.33
8.2.100.0070.00418.09
8.2.90.0030.00619.36
8.2.80.0030.00617.97
8.2.70.0070.00419.39
8.2.60.0060.00318.03
8.2.50.0050.00318.10
8.2.40.0040.00420.62
8.2.30.0000.00818.30
8.2.20.0060.00317.78
8.2.10.0000.00817.93
8.2.00.0030.00518.09
8.1.280.0140.01125.92
8.1.270.0060.01224.09
8.1.260.0130.00726.35
8.1.250.0130.00728.09
8.1.240.0060.00324.03
8.1.230.0060.00619.11
8.1.220.0000.00817.79
8.1.210.0000.00818.77
8.1.200.0030.00617.72
8.1.190.0050.00317.60
8.1.180.0080.00018.10
8.1.170.0030.00518.75
8.1.160.0000.00822.25
8.1.150.0040.00418.80
8.1.140.0000.00917.57
8.1.130.0000.00917.88
8.1.120.0070.00017.63
8.1.110.0030.00517.52
8.1.100.0040.00417.67
8.1.90.0080.00017.54
8.1.80.0000.00817.54
8.1.70.0000.00817.54
8.1.60.0100.00017.74
8.1.50.0080.00017.71
8.1.40.0000.00917.66
8.1.30.0030.00617.81
8.1.20.0030.00617.88
8.1.10.0040.00417.73
8.1.00.0030.00617.67
8.0.300.0030.00620.07
8.0.290.0080.00017.13
8.0.280.0000.00718.46
8.0.270.0000.00817.31
8.0.260.0000.00717.06
8.0.250.0080.00017.10
8.0.240.0000.00817.11
8.0.230.0000.00717.12
8.0.220.0040.00417.14
8.0.210.0030.00517.12
8.0.200.0000.00717.18
8.0.190.0000.00917.21
8.0.180.0080.00017.17
8.0.170.0030.00617.03
8.0.160.0030.00617.17
8.0.150.0000.00716.96
8.0.140.0040.00417.02
8.0.130.0000.00613.58
8.0.120.0080.00017.11
8.0.110.0000.00816.96
8.0.100.0070.00016.95
8.0.90.0060.00317.23
8.0.80.0100.00717.14
8.0.70.0000.00816.91
8.0.60.0000.00816.98
8.0.50.0080.00017.19
8.0.30.0160.00517.32
8.0.20.0180.00317.48
8.0.10.0050.00317.21
8.0.00.0100.00817.06
7.4.330.0000.00615.02
7.4.320.0000.00616.85
7.4.300.0000.00716.75
7.4.290.0000.00716.82
7.4.280.0000.00916.88
7.4.270.0040.00416.61
7.4.260.0040.00416.75
7.4.250.0040.00416.73
7.4.240.0020.00516.72
7.4.230.0000.00716.87
7.4.220.0090.00916.86
7.4.210.0060.01016.84
7.4.200.0040.00416.85
7.4.190.0040.00416.84
7.4.160.0130.00516.73
7.4.150.0060.01217.40
7.4.140.0210.01217.86
7.4.130.0120.00816.87
7.4.120.0090.01216.94
7.4.110.0130.00616.82
7.4.100.0150.00416.69
7.4.90.0180.00016.80
7.4.80.0100.01019.39
7.4.70.0130.00916.87
7.4.60.0070.01116.80
7.4.50.0000.00916.84
7.4.40.0000.01422.77
7.4.30.0130.01016.84
7.4.00.0100.00615.30
7.3.330.0000.00613.47
7.3.320.0030.00313.39
7.3.310.0040.00416.46
7.3.300.0070.00016.58
7.3.290.0070.01316.54
7.3.280.0060.01116.61
7.3.270.0150.00517.40
7.3.260.0100.01416.51
7.3.250.0100.01116.66
7.3.240.0140.00816.52
7.3.230.0140.00416.70
7.3.210.0110.00716.66
7.3.200.0030.02019.39
7.3.190.0150.00916.69
7.3.180.0070.01016.49
7.3.170.0100.01016.56
7.3.160.0210.00316.68
7.3.120.0070.00714.70
7.3.110.0070.01115.12
7.3.100.0060.00715.22
7.3.90.0000.01315.07
7.3.80.0040.01115.07
7.3.70.0090.00614.95
7.3.60.0030.01215.00
7.3.50.0090.00615.05
7.3.40.0070.01015.22
7.3.30.0030.01415.06
7.3.20.0000.01216.82
7.3.10.0030.00916.85
7.3.00.0050.00816.79
7.2.330.0160.01416.88
7.2.320.0190.00016.93
7.2.310.0110.01416.77
7.2.300.0100.01016.85
7.2.290.0090.00916.83
7.2.240.0060.00915.20
7.2.230.0000.01215.34
7.2.220.0070.00715.14
7.2.210.0070.00715.56
7.2.200.0040.00715.33
7.2.190.0030.01015.08
7.2.180.0100.00315.00
7.2.170.0030.00915.27
7.2.160.0060.00915.32
7.2.150.0090.00617.09
7.2.140.0040.01117.12
7.2.130.0070.01017.32
7.2.120.0070.01017.02
7.2.110.0060.01017.09
7.2.100.0150.00717.19
7.2.90.0050.00717.01
7.2.80.0020.01117.08
7.2.70.0090.00817.08
7.2.60.0050.00617.17
7.2.50.0030.01117.14
7.2.40.0070.00817.15
7.2.30.0050.01017.21
7.2.20.0030.01017.27
7.2.10.0110.00317.09
7.2.00.0080.00817.16
7.1.330.0070.00716.11
7.1.320.0070.00715.74
7.1.310.0040.00416.10
7.1.300.0000.01015.77
7.1.290.0070.00716.11
7.1.280.0040.00715.98
7.1.270.0050.00515.93
7.1.260.0100.00316.04
7.1.250.0050.00916.16
7.1.200.0040.00415.79
7.1.70.0040.00417.34
7.1.60.0060.01919.82
7.1.50.0070.01417.08
7.1.00.0030.07322.33
7.0.200.0030.01016.94
7.0.140.0030.07321.98
7.0.70.0000.07320.04
7.0.60.0030.08019.98
7.0.50.0170.07320.43
7.0.40.0170.07720.07
7.0.30.0000.05320.06
7.0.20.0100.08020.06
7.0.10.0130.05020.07
7.0.00.0000.04720.10
5.6.280.0000.07720.87
5.6.220.0070.08020.67
5.6.210.0170.06320.64
5.6.200.0030.09021.10
5.6.190.0230.07021.04
5.6.180.0070.08021.13
5.6.170.0100.09021.14
5.6.160.0070.08321.04
5.6.150.0070.05321.02
5.6.140.0070.08320.97
5.6.130.0200.07321.04
5.6.120.0100.07721.16
5.6.110.0070.09020.97
5.6.100.0100.07721.02
5.6.90.0230.06721.14
5.6.80.0030.08320.49
5.6.70.0030.05720.35
5.6.60.0130.04320.50
5.6.50.0100.08020.52
5.6.40.0070.07320.40
5.6.30.0070.05720.47
5.6.20.0070.05720.40
5.6.10.0100.08020.31
5.6.00.0030.08020.51
5.5.360.0100.03720.40
5.5.350.0000.09020.41
5.5.340.0130.07320.67
5.5.330.0170.07320.82
5.5.320.0070.08320.93
5.5.310.0100.07720.95
5.5.300.0000.07720.78
5.5.290.0100.07720.88
5.5.280.0030.05320.82
5.5.270.0100.08320.77
5.5.260.0170.07720.78
5.5.250.0100.08020.48
5.5.240.0100.08020.20
5.5.230.0130.07320.14
5.5.220.0030.06020.23
5.5.210.0000.08320.27
5.5.200.0070.05720.19
5.5.190.0100.06720.28
5.5.180.0130.05720.10
5.5.160.0030.05720.20
5.5.150.0200.07020.27
5.5.140.0130.07720.15
5.5.130.0030.08320.24
5.5.120.0100.04320.01
5.5.110.0070.08320.17
5.5.100.0130.07320.00
5.5.90.0070.08020.09
5.5.80.0130.07320.07
5.5.70.0030.08319.96
5.5.60.0000.09020.16
5.5.50.0070.05320.13
5.5.40.0070.07319.95
5.5.30.0100.08720.01
5.5.20.0070.08020.02
5.5.10.0100.07719.97
5.5.00.0030.07719.98
5.4.450.0070.04019.38
5.4.440.0070.05719.16
5.4.430.0170.07719.55
5.4.420.0100.07719.46
5.4.410.0100.06319.16
5.4.400.0130.06719.15
5.4.390.0000.08018.90
5.4.380.0030.06318.95
5.4.370.0070.07719.05
5.4.360.0100.07319.03
5.4.350.0100.08018.93
5.4.340.0030.08019.03
5.4.320.0100.07719.23
5.4.310.0130.08318.95
5.4.300.0100.06318.99
5.4.290.0070.07019.07
5.4.280.0130.08318.90
5.4.270.0130.07319.06
5.4.260.0130.07319.03
5.4.250.0100.07719.07
5.4.240.0070.08018.78
5.4.230.0130.07719.07
5.4.220.0070.08018.80
5.4.210.0070.08019.05
5.4.200.0100.07019.04
5.4.190.0070.05319.02
5.4.180.0170.07019.05
5.4.170.0170.04019.04
5.4.160.0070.06019.05
5.4.150.0200.06019.03
5.4.140.0000.04716.34
5.4.130.0100.07316.38
5.4.120.0130.06716.32
5.4.110.0070.07316.48
5.4.100.0030.07716.41
5.4.90.0030.07716.27
5.4.80.0070.07016.26
5.4.70.0070.08016.37
5.4.60.0030.05016.27
5.4.50.0100.07316.48
5.4.40.0070.05016.27
5.4.30.0100.07016.24
5.4.20.0330.05016.43
5.4.10.0070.07316.43
5.4.00.0070.05015.77
5.3.290.0000.04314.55
5.3.280.0030.05014.57
5.3.270.0030.08314.64
5.3.260.0070.05014.45
5.3.250.0070.04314.64
5.3.240.0030.07014.59
5.3.230.0130.07014.58
5.3.220.0100.06314.60
5.3.210.0100.07714.59
5.3.200.0030.04014.55
5.3.190.0070.06314.45
5.3.180.0030.08014.56
5.3.170.0030.05714.50
5.3.160.0030.08314.57
5.3.150.0070.08014.55
5.3.140.0030.08314.54
5.3.130.0100.06314.51
5.3.120.0130.07314.41
5.3.110.0070.07314.52
5.3.100.0030.04013.89
5.3.90.0130.03014.04
5.3.80.0130.07014.01
5.3.70.0000.04014.02
5.3.60.0030.03714.01
5.3.50.0130.07013.93
5.3.40.0000.04013.80
5.3.30.0170.06313.88
5.3.20.0100.07313.47
5.3.10.0030.07713.54
5.3.00.0030.06313.63
5.2.170.0100.06711.01
5.2.160.0030.03011.00
5.2.150.0000.03311.13
5.2.140.0070.05311.17
5.2.130.0070.06310.99
5.2.120.0070.06010.99
5.2.110.0000.05311.17
5.2.100.0030.03311.13
5.2.90.0070.02710.96
5.2.80.0030.06311.08
5.2.70.0030.04010.99
5.2.60.0070.02711.04
5.2.50.0100.04311.04
5.2.40.0030.03011.01
5.2.30.0030.03010.85
5.2.20.0030.06710.97
5.2.10.0000.03310.91
5.2.00.0070.06010.80
5.1.60.0000.05710.55
5.1.50.0000.06010.55
5.1.40.0170.04310.55
5.1.30.0070.05310.55
5.1.20.0030.06010.55
5.1.10.0070.05010.55
5.1.00.0000.04710.55
5.0.50.0030.03710.55
5.0.40.0000.03710.55
5.0.30.0070.04010.55
5.0.20.0000.05010.55
5.0.10.0030.04310.55
5.0.00.0000.05010.55
4.4.90.0070.03010.55
4.4.80.0000.01710.55
4.4.70.0030.03010.55
4.4.60.0030.03710.55
4.4.50.0030.02310.55
4.4.40.0030.05310.55
4.4.30.0000.03710.55
4.4.20.0030.03310.55
4.4.10.0000.03710.55
4.4.00.0000.06010.55
4.3.110.0000.03010.55
4.3.100.0030.03310.55
4.3.90.0000.03010.55
4.3.80.0030.05310.55
4.3.70.0000.04010.55
4.3.60.0030.02710.55
4.3.50.0070.03310.55
4.3.40.0030.05010.55
4.3.30.0070.01710.55
4.3.20.0000.03310.55
4.3.10.0070.03310.55
4.3.00.0030.03010.55

preferences:
46.66 ms | 401 KiB | 5 Q