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 97; .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($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.0110.00416.63
8.3.50.0130.00322.10
8.3.40.0070.00718.70
8.3.30.0150.00318.96
8.3.20.0040.00420.20
8.3.10.0080.00021.91
8.3.00.0040.00422.52
8.2.180.0150.00716.88
8.2.170.0070.01122.96
8.2.160.0060.00922.28
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0060.01326.16
8.2.120.0000.00722.39
8.2.110.0040.00422.39
8.2.100.0170.00317.69
8.2.90.0030.00619.16
8.2.80.0050.00317.97
8.2.70.0040.00417.63
8.2.60.0080.00018.04
8.2.50.0030.00518.07
8.2.40.0060.00318.22
8.2.30.0000.00917.97
8.2.20.0000.00817.88
8.2.10.0070.00017.91
8.2.00.0080.00017.83
8.1.280.0070.00725.92
8.1.270.0030.00623.97
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00323.91
8.1.230.0080.00419.21
8.1.220.0000.00817.74
8.1.210.0050.00318.77
8.1.200.0030.00717.48
8.1.190.0040.00417.50
8.1.180.0080.00018.10
8.1.170.0000.00818.66
8.1.160.0060.00322.08
8.1.150.0000.00818.74
8.1.140.0000.00817.61
8.1.130.0000.00717.84
8.1.120.0030.00517.66
8.1.110.0050.00317.57
8.1.100.0000.00717.64
8.1.90.0000.00817.53
8.1.80.0040.00417.59
8.1.70.0030.00517.46
8.1.60.0030.00617.66
8.1.50.0050.00317.68
8.1.40.0000.00817.68
8.1.30.0000.00917.75
8.1.20.0080.00017.66
8.1.10.0030.00517.66
8.1.00.0000.00817.63
8.0.300.0070.00018.77
8.0.290.0030.00617.17
8.0.280.0000.00818.49
8.0.270.0070.00017.25
8.0.260.0030.00316.98
8.0.250.0000.00717.02
8.0.240.0030.00517.08
8.0.230.0040.00417.04
8.0.220.0030.00317.04
8.0.210.0080.00016.93
8.0.200.0000.00717.13
8.0.190.0040.00416.98
8.0.180.0040.00417.00
8.0.170.0000.00716.97
8.0.160.0050.00317.11
8.0.150.0040.00416.92
8.0.140.0040.00416.91
8.0.130.0030.00313.49
8.0.120.0090.00016.99
8.0.110.0040.00416.92
8.0.100.0040.00416.97
8.0.90.0040.00416.93
8.0.80.0100.01016.93
8.0.70.0040.00416.89
8.0.60.0000.00717.07
8.0.50.0000.00817.09
8.0.30.0150.00417.25
8.0.20.0170.00217.40
8.0.10.0000.00717.11
8.0.00.0080.01316.77
7.4.330.0020.00215.16
7.4.320.0000.00716.73
7.4.300.0000.00616.59
7.4.290.0000.00716.67
7.4.280.0080.00016.76
7.4.270.0030.00616.85
7.4.260.0000.00716.83
7.4.250.0040.00416.70
7.4.240.0020.00516.74
7.4.230.0040.00416.72
7.4.220.0100.00916.67
7.4.210.0080.00916.79
7.4.200.0000.00716.64
7.4.190.0000.00716.95
7.4.160.0070.01016.69
7.4.150.0170.00717.40
7.4.140.0120.01217.86
7.4.130.0100.00716.77
7.4.120.0150.00316.78
7.4.110.0140.00316.69
7.4.100.0060.01316.54
7.4.90.0150.00916.76
7.4.80.0060.01719.39
7.4.70.0050.01116.75
7.4.60.0140.00316.60
7.4.50.0000.00416.46
7.4.40.0050.01022.77
7.4.30.0080.00916.76
7.4.00.0090.00915.14
7.3.330.0000.00713.21
7.3.320.0000.00513.32
7.3.310.0030.00516.54
7.3.300.0040.00416.50
7.3.290.0030.01016.48
7.3.280.0110.00716.48
7.3.270.0090.00917.40
7.3.260.0130.01016.51
7.3.250.0060.01116.58
7.3.240.0140.00716.60
7.3.230.0060.01016.63
7.3.210.0070.01016.66
7.3.200.0000.01719.39
7.3.190.0090.01216.83
7.3.180.0090.00616.45
7.3.170.0070.00716.27
7.3.160.0120.00916.85
7.3.120.0070.01015.31
7.2.330.0120.00916.81
7.2.320.0030.01316.83
7.2.310.0120.00616.88
7.2.300.0070.01016.86
7.2.290.0030.01416.89
7.2.00.0030.00919.54
7.1.100.0040.01118.39
7.1.70.0030.00617.41
7.1.60.0090.01619.29
7.1.50.0120.00917.35
7.1.00.0100.06722.55
7.0.200.0090.00317.07
7.0.140.0100.06721.95
7.0.100.0170.05320.00
7.0.90.0000.08719.93
7.0.80.0170.05719.93
7.0.70.0230.05019.89
7.0.60.0370.06719.96
7.0.50.0070.08320.40
7.0.40.0000.05320.16
7.0.30.0130.07320.18
7.0.20.0170.07720.18
7.0.10.0070.08720.05
7.0.00.0030.08719.99
5.6.250.0070.08320.65
5.6.240.0070.05020.69
5.6.230.0100.04720.62
5.6.220.0130.04020.52
5.6.210.0170.04720.69
5.6.200.0070.08021.07
5.6.190.0100.08321.07
5.6.180.0070.09021.03
5.6.170.0070.07721.14
5.6.160.0100.05720.98
5.6.150.0100.06721.02
5.6.140.0070.08021.13
5.6.130.0070.08321.03
5.6.120.0030.08721.13
5.6.110.0070.08021.12
5.6.100.0100.07721.15
5.6.90.0030.06020.94
5.6.80.0070.08020.41
5.6.70.0170.06720.46
5.6.60.0200.04320.35
5.6.50.0270.03020.45
5.6.40.0100.08020.51
5.6.30.0130.07320.35
5.6.20.0130.07320.33
5.6.10.0000.08320.41
5.6.00.0130.07720.40
5.5.380.0170.06320.37
5.5.370.0100.08320.37
5.5.360.0100.05320.38
5.5.350.0000.07320.48
5.5.340.0030.04720.82
5.5.330.0170.07020.67
5.5.320.0100.07720.89
5.5.310.0030.05320.89
5.5.300.0000.07720.94
5.5.290.0030.08320.76
5.5.280.0100.08320.85
5.5.270.0000.09020.74
5.5.260.0170.08020.90
5.5.250.0100.07720.66
5.5.240.0100.08020.31
5.5.230.0200.07320.12
5.5.220.0100.07720.26
5.5.210.0070.07320.23
5.5.200.0170.05020.21
5.5.190.0070.07720.17
5.5.180.0130.06320.25
5.5.160.0070.08020.10
5.5.150.0130.07320.30
5.5.140.0200.06720.01
5.5.130.0070.07720.30
5.5.120.0070.06320.22
5.5.110.0030.06720.01
5.5.100.0070.04020.08
5.5.90.0070.08020.07
5.5.80.0070.07720.09
5.5.70.0170.05020.17
5.5.60.0070.07320.18
5.5.50.0070.06720.01
5.5.40.0130.07020.13
5.5.30.0170.07020.04
5.5.20.0030.08320.10
5.5.10.0000.08320.04
5.5.00.0030.07720.01
5.4.450.0100.05019.56
5.4.440.0070.06319.35
5.4.430.0000.07019.49
5.4.420.0030.08019.13
5.4.410.0100.08319.16
5.4.400.0100.06319.05
5.4.390.0130.04019.12
5.4.380.0100.06718.98
5.4.370.0100.07018.81
5.4.360.0030.08318.95
5.4.350.0030.07318.97
5.4.340.0100.05019.10
5.4.320.0100.05718.79
5.4.310.0070.08019.11
5.4.300.0070.08018.98
5.4.290.0070.06019.07
5.4.280.0070.07019.22
5.4.270.0100.04318.96
5.4.260.0170.07018.90
5.4.250.0070.03718.89
5.4.240.0000.09018.89
5.4.230.0170.06319.00
5.4.220.0100.06719.13
5.4.210.0030.07318.97
5.4.200.0130.03719.22
5.4.190.0070.07019.02
5.4.180.0070.04318.89
5.4.170.0070.06719.21
5.4.160.0000.07019.05
5.4.150.0130.07019.14
5.4.140.0100.07316.29
5.4.130.0030.07016.37
5.4.120.0000.06716.33
5.4.110.0070.07716.48
5.4.100.0070.06716.36
5.4.90.0030.07316.33
5.4.80.0070.04016.39
5.4.70.0100.03016.36
5.4.60.0030.03716.35
5.4.50.0030.03716.21
5.4.40.0070.03716.24
5.4.30.0000.04016.30
5.4.20.0030.03716.20
5.4.10.0000.04016.33
5.4.00.0100.03015.71
5.3.290.0230.06014.65
5.3.280.0030.07714.60
5.3.270.0030.04314.54
5.3.260.0070.07314.45
5.3.250.0030.08014.54
5.3.240.0100.07714.56
5.3.230.0100.08014.48
5.3.220.0130.07714.58
5.3.210.0000.08014.59
5.3.200.0000.07714.57
5.3.190.0130.07314.45
5.3.180.0100.03714.42
5.3.170.0070.03714.57
5.3.160.0000.05014.49
5.3.150.0000.03714.55
5.3.140.0030.03714.41
5.3.130.0030.03714.41
5.3.120.0030.03714.55
5.3.110.0030.03714.54
5.3.100.0100.03313.93
5.3.90.0070.04313.87
5.3.80.0000.04013.89
5.3.70.0030.04014.02
5.3.60.0030.03714.01
5.3.50.0070.02713.88
5.3.40.0030.06713.93
5.3.30.0100.05713.70
5.3.20.0000.03713.70
5.3.10.0030.07013.43
5.3.00.0000.03713.64
5.2.170.0070.02712.31
5.2.160.0070.04712.31
5.2.150.0030.04712.31
5.2.140.0070.02712.31
5.2.130.0000.03012.31
5.2.120.0030.02712.31
5.2.110.0000.02712.31
5.2.100.0100.02012.31
5.2.90.0000.03012.31
5.2.80.0100.02712.31
5.2.70.0030.03012.31
5.2.60.0030.03012.31
5.2.50.0000.03012.31
5.2.40.0030.02712.31
5.2.30.0000.03012.31
5.2.20.0070.02712.31
5.2.10.0000.03012.31
5.2.00.0130.02012.31
5.1.60.0070.02712.31
5.1.50.0000.02712.31
5.1.40.0030.02712.31
5.1.30.0030.02712.31
5.1.20.0000.02712.31
5.1.10.0030.02312.31
5.1.00.0000.02712.31
5.0.50.0030.01712.31
5.0.40.0000.02012.31
5.0.30.0000.03312.31
5.0.20.0000.02012.31
5.0.10.0000.03012.31
5.0.00.0000.03312.31
4.4.90.0030.01712.31
4.4.80.0000.02012.31
4.4.70.0070.01012.31
4.4.60.0000.01712.31
4.4.50.0000.01712.31
4.4.40.0030.02312.31
4.4.30.0030.01312.31
4.4.20.0070.00712.31
4.4.10.0070.01012.31
4.4.00.0030.04712.31
4.3.110.0030.01312.31
4.3.100.0000.01712.31
4.3.90.0030.02012.31
4.3.80.0000.02312.31
4.3.70.0000.01312.31
4.3.60.0030.01312.31
4.3.50.0000.01712.31
4.3.40.0000.02312.31
4.3.30.0000.01712.31
4.3.20.0000.01712.31
4.3.10.0030.01312.31
4.3.00.0000.01312.31

preferences:
42.09 ms | 401 KiB | 5 Q