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_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.0130.00618.68
8.3.50.0140.00822.03
8.3.40.0160.00319.12
8.3.30.0120.00619.21
8.3.20.0040.00420.24
8.3.10.0040.00422.08
8.3.00.0110.00422.34
8.2.180.0120.00316.88
8.2.170.0090.00622.96
8.2.160.0110.00321.25
8.2.150.0030.00524.18
8.2.140.0040.00424.66
8.2.130.0150.00426.16
8.2.120.0130.00617.87
8.2.110.0060.00322.36
8.2.100.0090.00317.86
8.2.90.0090.00019.21
8.2.80.0040.00418.18
8.2.70.0050.00318.00
8.2.60.0040.00418.29
8.2.50.0000.00818.07
8.2.40.0060.00318.22
8.2.30.0000.00718.13
8.2.20.0080.00017.84
8.2.10.0000.00819.73
8.2.00.0100.00018.05
8.1.280.0140.00725.92
8.1.270.0080.00022.22
8.1.260.0100.01026.35
8.1.250.0130.00728.09
8.1.240.0030.00618.74
8.1.230.0070.00419.21
8.1.220.0030.00617.79
8.1.210.0050.00318.77
8.1.200.0100.00017.48
8.1.190.0050.00317.41
8.1.180.0000.00818.10
8.1.170.0000.00918.80
8.1.160.0040.00422.07
8.1.150.0030.00518.79
8.1.140.0060.00317.61
8.1.130.0030.00317.86
8.1.120.0040.00417.66
8.1.110.0000.00717.66
8.1.100.0070.00017.69
8.1.90.0040.00417.69
8.1.80.0040.00417.68
8.1.70.0000.00717.62
8.1.60.0000.00817.68
8.1.50.0000.00817.69
8.1.40.0030.00517.66
8.1.30.0030.00617.83
8.1.20.0040.00417.84
8.1.10.0050.00517.76
8.1.00.0030.00517.63
8.0.300.0040.00418.77
8.0.290.0030.00617.18
8.0.280.0040.00418.57
8.0.270.0040.00417.34
8.0.260.0000.00717.16
8.0.250.0050.00217.25
8.0.240.0040.00417.10
8.0.230.0000.00817.27
8.0.220.0050.00217.14
8.0.210.0050.00317.18
8.0.200.0040.00417.11
8.0.190.0000.00717.23
8.0.180.0000.00817.24
8.0.170.0080.00017.07
8.0.160.0040.00417.02
8.0.150.0000.00717.09
8.0.140.0000.00716.96
8.0.130.0030.00313.62
8.0.120.0040.00417.05
8.0.110.0030.00617.16
8.0.100.0080.00017.12
8.0.90.0000.00716.95
8.0.80.0090.00617.21
8.0.70.0080.00017.12
8.0.60.0030.00617.16
8.0.50.0040.00417.15
8.0.30.0080.01117.52
8.0.20.0080.01217.51
8.0.10.0040.00417.14
8.0.00.0120.01117.02
7.4.330.0030.00315.00
7.4.320.0030.00316.77
7.4.300.0020.00516.67
7.4.290.0000.00816.78
7.4.280.0000.00716.86
7.4.270.0000.00716.88
7.4.260.0040.00416.65
7.4.250.0020.00516.75
7.4.240.0020.00516.70
7.4.230.0070.00016.86
7.4.220.0110.00716.72
7.4.210.0080.01016.81
7.4.200.0000.00816.83
7.4.190.0030.00516.75
7.4.160.0120.00316.92
7.4.150.0090.00917.40
7.4.140.0090.01017.86
7.4.130.0130.00416.82
7.4.120.0110.01116.85
7.4.110.0070.01117.09
7.4.100.0090.00916.88
7.4.90.0060.01216.80
7.4.80.0040.01516.63
7.4.70.0100.00716.81
7.4.60.0060.01216.67
7.4.50.0030.00616.63
7.4.40.0080.00822.77
7.4.30.0130.00716.82
7.4.00.0060.01014.95
7.3.330.0000.00613.31
7.3.320.0030.00313.52
7.3.310.0050.00216.43
7.3.300.0000.00716.54
7.3.290.0050.00916.70
7.3.280.0110.00916.57
7.3.270.0140.00317.40
7.3.260.0030.01616.70
7.3.250.0150.00816.77
7.3.240.0130.00916.76
7.3.230.0060.01216.75
7.3.210.0070.01016.66
7.3.200.0150.00919.39
7.3.190.0110.01116.71
7.3.180.0090.01216.75
7.3.170.0100.00716.62
7.3.160.0090.01216.57
7.3.120.0030.01014.88
7.2.330.0130.00716.84
7.2.320.0110.00816.86
7.2.310.0110.00716.88
7.2.300.0000.01716.71
7.2.290.0100.00716.88
7.2.00.0080.00419.52
7.1.100.0070.00718.57
7.1.70.0020.00517.53
7.1.60.0100.01419.82
7.1.50.0030.01917.32
7.1.00.0030.07322.32
7.0.200.0040.01117.03
7.0.140.0170.05722.08
7.0.100.0130.03719.93
7.0.90.0100.05019.96
7.0.80.0270.05019.94
7.0.70.0230.08020.17
7.0.60.0130.03720.10
7.0.50.0200.06320.35
7.0.40.0070.05720.11
7.0.30.0100.05320.07
7.0.20.0070.03720.17
7.0.10.0070.05020.02
7.0.00.0000.04020.07
5.6.280.0070.07021.17
5.6.250.0070.06320.52
5.6.240.0070.05020.53
5.6.230.0100.04020.61
5.6.220.0030.04020.69
5.6.210.0100.07720.67
5.6.200.0100.04721.11
5.6.190.0100.03321.19
5.6.180.0130.02720.96
5.6.170.0100.04021.07
5.6.160.0030.04321.04
5.6.150.0100.03721.13
5.6.140.0030.03320.96
5.6.130.0070.03021.08
5.6.120.0030.04721.01
5.6.110.0000.04720.95
5.6.100.0070.03720.96
5.6.90.0000.04020.95
5.6.80.0030.03720.51
5.6.70.0070.04020.45
5.6.60.0030.03320.34
5.6.50.0030.03320.50
5.6.40.0030.03320.38
5.6.30.0030.03320.52
5.6.20.0030.03320.42
5.6.10.0070.03320.33
5.6.00.0030.03320.38
5.5.380.0070.04720.54
5.5.370.0170.06720.39
5.5.360.0070.08720.41
5.5.350.0130.08320.35
5.5.340.0100.04020.86
5.5.330.0030.08720.82
5.5.320.0070.04020.91
5.5.310.0070.04020.90
5.5.300.0070.04020.80
5.5.290.0100.04320.80
5.5.280.0130.02720.94
5.5.270.0070.03320.78
5.5.260.0030.04320.77
5.5.250.0070.04020.55
5.5.240.0030.03720.04
5.5.230.0070.03020.20
5.5.220.0070.03020.26
5.5.210.0030.03320.20
5.5.200.0070.03020.18
5.5.190.0000.03720.29
5.5.180.0000.04020.13
5.5.160.0100.03020.18
5.5.150.0030.03320.21
5.5.140.0070.03320.27
5.5.130.0070.03320.29
5.5.120.0030.03320.13
5.5.110.0100.02720.14
5.5.100.0030.03319.98
5.5.90.0030.03320.18
5.5.80.0000.03720.09
5.5.70.0000.03720.09
5.5.60.0070.03020.02
5.5.50.0000.03720.08
5.5.40.0030.03320.06
5.5.30.0070.03020.15
5.5.20.0030.03320.12
5.5.10.0000.03720.08
5.5.00.0030.06719.99
5.4.450.0070.04019.56
5.4.440.0100.03719.56
5.4.430.0000.03719.23
5.4.420.0070.03019.47
5.4.410.0030.03319.43
5.4.400.0000.03719.05
5.4.390.0000.03318.82
5.4.380.0030.03319.03
5.4.370.0030.03018.98
5.4.360.0000.03719.04
5.4.350.0000.03719.15
5.4.340.0000.03318.95
5.4.320.0100.03719.07
5.4.310.0030.03318.79
5.4.300.0000.03319.12
5.4.290.0030.03019.05
5.4.280.0030.03318.96
5.4.270.0100.02718.96
5.4.260.0030.03018.83
5.4.250.0030.03019.05
5.4.240.0030.03019.23
5.4.230.0030.03319.02
5.4.220.0030.03019.10
5.4.210.0000.04019.23
5.4.200.0000.03718.81
5.4.190.0030.03318.80
5.4.180.0100.02718.78
5.4.170.0030.03318.93
5.4.160.0030.08018.95
5.4.150.0100.07318.77
5.4.140.0070.03016.39
5.4.130.0000.03316.12
5.4.120.0030.05016.34
5.4.110.0000.07016.31
5.4.100.0070.06716.49
5.4.90.0030.04316.32
5.4.80.0030.03716.26
5.4.70.0070.03316.30
5.4.60.0070.03716.28
5.4.50.0030.03716.46
5.4.40.0030.05016.29
5.4.30.0100.03716.23
5.4.20.0070.03716.46
5.4.10.0030.04716.35
5.4.00.0030.03715.82
5.3.290.0030.03014.53
5.3.280.0000.03314.48
5.3.270.0030.03314.59
5.3.260.0000.05014.62
5.3.250.0100.03714.45
5.3.240.0070.07014.59
5.3.230.0070.06314.59
5.3.220.0000.08014.43
5.3.210.0000.08014.58
5.3.200.0170.06714.46
5.3.190.0030.08014.58
5.3.180.0030.06714.58
5.3.170.0030.06314.50
5.3.160.0030.05714.41
5.3.150.0000.04014.42
5.3.140.0030.04014.56
5.3.130.0130.05714.51
5.3.120.0100.03714.44
5.3.110.0000.04714.48
5.3.100.0100.06314.00
5.3.90.0030.04313.91
5.3.80.0030.07713.90
5.3.70.0030.03713.80
5.3.60.0130.02713.97
5.3.50.0070.05013.96
5.3.40.0030.05013.82
5.3.30.0070.03313.92
5.3.20.0170.06713.70
5.3.10.0070.04313.44
5.3.00.0070.06013.63
5.2.170.0030.06011.17
5.2.160.0030.03711.02
5.2.150.0030.03011.16
5.2.140.0100.02711.22
5.2.130.0000.04711.15
5.2.120.0030.05711.09
5.2.110.0070.04711.13
5.2.100.0070.06311.14
5.2.90.0100.02711.16
5.2.80.0070.02711.04
5.2.70.0030.03311.19
5.2.60.0030.03010.99
5.2.50.0070.02710.99
5.2.40.0030.05011.04
5.2.30.0030.05310.86
5.2.20.0100.03011.00
5.2.10.0030.05310.81
5.2.00.0000.03310.81
5.1.60.0030.05010.01
5.1.50.0070.02010.04
5.1.40.0000.02710.07
5.1.30.0000.05310.43
5.1.20.0000.04710.23
5.1.10.0030.05010.14
5.1.00.0000.05310.10
5.0.50.0000.0309.24
5.0.40.0030.0409.24
5.0.30.0000.0409.24
5.0.20.0030.0239.24
5.0.10.0030.0339.24
5.0.00.0030.0509.24
4.4.90.0000.0209.24
4.4.80.0030.0279.24
4.4.70.0000.0179.24
4.4.60.0000.0379.24
4.4.50.0030.0339.24
4.4.40.0030.0309.24
4.4.30.0070.0379.24
4.4.20.0070.0279.24
4.4.10.0030.0179.24
4.4.00.0030.0539.24
4.3.110.0030.0339.24
4.3.100.0000.0209.24
4.3.90.0000.0309.24
4.3.80.0030.0309.24
4.3.70.0000.0209.24
4.3.60.0030.0139.24
4.3.50.0030.0409.24
4.3.40.0000.0379.24
4.3.30.0000.0209.24
4.3.20.0000.0139.24
4.3.10.0030.0209.24
4.3.00.0030.0339.24

preferences:
53.86 ms | 401 KiB | 5 Q