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'); foreach ($oses as $os => $identificator) { if (is_array($identificator)) { foreach ($identificator as $ident) { if (preg_match("#$ident#i", $useragent)) { $browser['os'] = $os; break; } } } else { if (preg_match("#$identificator#i", $useragent)) { $browser['os'] = $os; break; } } } user_error($os, E_USER_ERROR); ?>

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.0040.01518.43
8.3.50.0120.00622.13
8.3.40.0160.00019.18
8.3.30.0110.00719.29
8.3.20.0000.00820.34
8.3.10.0040.00423.46
8.3.00.0050.00320.96
8.2.180.0160.00616.75
8.2.170.0000.01522.96
8.2.160.0100.00320.64
8.2.150.0060.00324.18
8.2.140.0040.00424.66
8.2.130.0060.00326.16
8.2.120.0080.00019.86
8.2.110.0090.00022.29
8.2.100.0030.00917.97
8.2.90.0030.00617.99
8.2.80.0000.00917.97
8.2.70.0000.01117.88
8.2.60.0040.00417.93
8.2.50.0030.00718.07
8.2.40.0030.00520.20
8.2.30.0040.00418.39
8.2.20.0050.00317.85
8.2.10.0080.00018.20
8.2.00.0060.00317.86
8.1.280.0000.01525.92
8.1.270.0050.00324.04
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0090.00022.68
8.1.230.0000.01121.00
8.1.220.0000.00817.89
8.1.210.0050.00318.77
8.1.200.0050.00517.46
8.1.190.0030.00617.60
8.1.180.0080.00018.10
8.1.170.0030.00718.89
8.1.160.0030.00522.14
8.1.150.0000.00818.71
8.1.140.0000.00817.60
8.1.130.0040.00419.67
8.1.120.0000.00717.59
8.1.110.0040.00417.66
8.1.100.0030.00517.74
8.1.90.0040.00417.59
8.1.80.0000.00717.58
8.1.70.0030.00517.63
8.1.60.0060.00317.75
8.1.50.0060.00317.75
8.1.40.0030.00717.61
8.1.30.0060.00317.72
8.1.20.0060.00317.76
8.1.10.0080.00017.79
8.1.00.0030.00517.70
8.0.300.0000.00720.02
8.0.290.0040.00417.00
8.0.280.0070.00018.53
8.0.270.0070.00017.38
8.0.260.0070.00017.38
8.0.250.0000.00717.23
8.0.240.0040.00717.22
8.0.230.0040.00417.13
8.0.220.0030.00517.13
8.0.210.0040.00417.14
8.0.200.0070.00017.17
8.0.190.0050.00317.22
8.0.180.0050.00317.16
8.0.170.0030.00517.20
8.0.160.0040.00417.02
8.0.150.0030.00617.14
8.0.140.0050.00316.96
8.0.130.0060.00013.59
8.0.120.0080.00017.11
8.0.110.0040.00417.15
8.0.100.0050.00317.20
8.0.90.0000.00717.05
8.0.80.0030.01417.19
8.0.70.0040.00417.11
8.0.60.0000.00717.19
8.0.50.0040.00417.10
8.0.30.0120.00717.24
8.0.20.0140.00917.40
8.0.10.0000.00717.33
8.0.00.0140.00717.10
7.4.330.0000.00615.15
7.4.320.0000.00616.79
7.4.300.0070.00016.79
7.4.290.0000.00716.71
7.4.280.0060.00316.89
7.4.270.0040.00416.91
7.4.260.0000.00716.73
7.4.250.0030.00516.81
7.4.240.0000.00716.75
7.4.230.0040.00416.81
7.4.220.0120.01516.98
7.4.210.0140.00016.94
7.4.200.0070.00016.75
7.4.160.0060.01116.76
7.4.150.0110.00817.40
7.4.140.0120.00617.86
7.4.130.0140.00316.67
7.4.120.0050.01216.81
7.4.110.0090.00916.80
7.4.100.0070.01116.94
7.4.90.0110.00816.89
7.4.80.0070.01019.39
7.4.70.0090.00616.67
7.4.60.0160.00716.71
7.4.50.0050.00016.56
7.4.40.0130.01016.90
7.4.30.0100.00716.90
7.4.00.0030.01215.42
7.3.330.0000.00613.42
7.3.320.0060.00013.38
7.3.310.0070.00016.63
7.3.300.0040.00416.52
7.3.290.0030.01116.51
7.3.280.0070.01016.64
7.3.270.0110.00817.40
7.3.260.0120.01216.56
7.3.250.0120.00816.56
7.3.240.0080.01116.77
7.3.230.0070.01016.61
7.3.210.0100.00716.75
7.3.200.0050.01419.39
7.3.190.0130.01016.97
7.3.180.0060.01116.73
7.3.170.0040.01316.71
7.3.160.0160.00616.66
7.3.120.0000.01115.00
7.2.330.0120.00616.92
7.2.320.0140.00416.88
7.2.310.0060.01216.89
7.2.300.0100.00716.82
7.2.290.0060.01817.00
7.1.70.0000.01017.18
7.1.60.0070.00417.68
7.1.50.0070.01417.29
7.1.00.0070.07322.41
7.0.200.0040.01417.11
7.0.140.0100.06321.98
7.0.60.0100.08019.96
7.0.50.0000.06717.95
7.0.40.0030.08320.11
7.0.30.0370.06320.15
7.0.20.0270.07720.27
7.0.10.0100.08320.27
7.0.00.0070.04720.22
5.6.280.0030.07321.13
5.6.210.0070.06720.69
5.6.200.0070.04318.13
5.6.190.0070.08720.58
5.6.180.0500.04020.42
5.6.170.0170.04020.42
5.6.160.0070.04020.51
5.6.150.0070.04318.21
5.6.140.0070.08018.18
5.6.130.0130.07718.16
5.6.120.0100.08321.04
5.6.110.0100.06721.14
5.6.100.0070.08320.98
5.6.90.0130.07721.04
5.6.80.0100.07720.53
5.5.350.3930.04320.36
5.5.340.0100.07718.00
5.5.330.0030.05320.07
5.5.320.0070.08020.21
5.5.310.0300.08320.21
5.5.300.0030.07717.92
5.5.290.0070.08317.90
5.5.280.0100.07020.67
5.5.270.0000.07720.70
5.5.260.0000.04720.82
5.5.250.0100.09020.73
5.5.240.0300.07320.21
5.4.450.0330.04719.38
5.4.440.0300.07319.46
5.4.430.0300.06719.21
5.4.420.0200.07019.46
5.4.410.0230.05019.28
5.4.400.0270.06719.11
5.4.390.0230.05018.79
5.4.380.0300.06019.24
5.4.370.0330.06719.14
5.4.360.0330.06719.09
5.4.350.0300.06318.89
5.4.340.0300.06019.17
5.4.320.0300.06319.11
5.4.310.0200.04719.09
5.4.300.0170.05019.25
5.4.290.0170.08019.08
5.4.280.0200.06719.14
5.4.270.0230.07718.89
5.4.260.0270.05319.09
5.4.250.0370.06019.08
5.4.240.0330.06319.08
5.4.230.0230.04018.92
5.4.220.0200.05019.13
5.4.210.0230.05319.09
5.4.200.0230.07718.90
5.4.190.0330.06319.08
5.4.180.0270.05319.13
5.4.170.0270.06719.13
5.4.160.0300.04319.23
5.4.150.0270.07319.11
5.4.140.0170.07316.49
5.4.130.0230.07016.38
5.4.120.0230.07716.60
5.4.110.0300.06316.54
5.4.100.0270.06716.12
5.4.90.0370.06016.46
5.4.80.0200.05016.43
5.4.70.0270.06716.48
5.4.60.0300.06716.46
5.4.50.0230.07016.43
5.4.40.0270.06716.25
5.4.30.0230.07016.52
5.4.20.0230.06716.46
5.4.10.0170.06016.41
5.4.00.0270.05315.79
5.3.290.0230.07014.52
5.3.280.0230.05314.50
5.3.270.0230.05014.46
5.3.260.0200.05014.54
5.3.250.0230.07014.59
5.3.240.0370.03714.47
5.3.230.0270.07314.49
5.3.220.0300.06714.59
5.3.210.0200.08014.62
5.3.200.0230.05314.64
5.3.190.0300.07314.55
5.3.180.0230.07314.50
5.3.170.0200.07714.45
5.3.160.0170.03714.57
5.3.150.0170.03714.54
5.3.140.0200.07714.52
5.3.130.0270.07314.43
5.3.120.0330.06714.53
5.3.110.0330.06714.41
5.3.100.0300.06313.94
5.3.90.0300.06713.90
5.3.80.0330.07013.89
5.3.70.0270.07014.05
5.3.60.0200.07314.14
5.3.50.0200.07313.92
5.3.40.0200.07713.81
5.3.30.0300.06713.73
5.3.20.0270.07013.81
5.3.10.0130.04013.66
5.3.00.0230.05713.62
5.2.170.0130.04013.52
5.2.160.0130.03013.52
5.2.150.0200.03713.52
5.2.140.0200.04313.52
5.2.130.0200.05313.52
5.2.120.0100.04013.52
5.2.110.0270.03013.52
5.2.100.0230.05313.52
5.2.90.0230.03013.52
5.2.80.0200.06013.52
5.2.70.0130.06713.52
5.2.60.0130.06013.52
5.2.50.0230.03313.52
5.2.40.0130.06313.52
5.2.30.0170.04313.52
5.2.20.0200.05313.52
5.2.10.0130.06713.52
5.2.00.0200.03013.52
5.1.60.0200.02713.52
5.1.50.0170.04013.52
5.1.40.0270.04013.52
5.1.30.0200.05313.52
5.1.20.0170.05713.52
5.1.10.0130.06013.52
5.1.00.0130.05713.52
5.0.50.0070.02713.52
5.0.40.0130.02313.52
5.0.30.0130.06313.52
5.0.20.0070.03013.52
5.0.10.0100.04713.52
5.0.00.0070.06713.52
4.4.90.0070.03713.52
4.4.80.0100.03313.52
4.4.70.0100.03713.52
4.4.60.0070.03013.52
4.4.50.0170.02713.52
4.4.40.0100.04013.52
4.4.30.0100.03713.52
4.4.20.0070.03713.52
4.4.10.0100.02313.52
4.4.00.0100.03013.52
4.3.110.0070.02313.52
4.3.100.0030.03713.52
4.3.90.0130.02313.52
4.3.80.0200.04313.52
4.3.70.0030.04013.52
4.3.60.0100.03313.52
4.3.50.0100.03713.52
4.3.40.0070.05713.52
4.3.30.0030.02013.52
4.3.20.0030.03313.52
4.3.10.0030.04013.52
4.3.00.0000.03313.52

preferences:
45.02 ms | 400 KiB | 5 Q