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($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.01018.68
8.3.50.0100.01022.03
8.3.40.0120.00318.92
8.3.30.0040.01419.21
8.3.20.0080.00020.29
8.3.10.0080.00022.07
8.3.00.0080.00022.34
8.2.180.0090.00618.79
8.2.170.0080.00822.96
8.2.160.0090.00621.20
8.2.150.0050.00324.18
8.2.140.0030.00624.66
8.2.130.0000.00826.16
8.2.120.0090.00019.85
8.2.110.0060.00322.20
8.2.100.0060.00618.03
8.2.90.0050.00319.08
8.2.80.0000.00818.05
8.2.70.0030.00517.75
8.2.60.0000.00917.93
8.2.50.0040.00418.07
8.2.40.0040.00418.09
8.2.30.0040.00418.27
8.2.20.0040.00417.77
8.2.10.0040.00417.79
8.2.00.0000.00717.91
8.1.280.0110.00425.92
8.1.270.0090.00023.97
8.1.260.0040.00426.35
8.1.250.0050.00228.09
8.1.240.0030.00723.86
8.1.230.0070.00419.16
8.1.220.0040.00417.74
8.1.210.0030.00518.77
8.1.200.0030.00617.60
8.1.190.0040.00417.40
8.1.180.0030.00618.10
8.1.170.0050.00318.80
8.1.160.0050.00322.02
8.1.150.0070.00318.91
8.1.140.0080.00017.55
8.1.130.0030.00517.73
8.1.120.0040.00417.56
8.1.110.0060.00517.52
8.1.100.0000.00717.63
8.1.90.0050.00217.68
8.1.80.0000.00817.59
8.1.70.0000.00717.58
8.1.60.0080.00017.79
8.1.50.0030.00617.68
8.1.40.0030.00617.61
8.1.30.0030.00617.84
8.1.20.0080.00017.85
8.1.10.0050.00317.60
8.1.00.0060.00317.65
8.0.300.0040.00418.77
8.0.290.0040.00417.18
8.0.280.0030.00318.48
8.0.270.0080.00017.23
8.0.260.0030.00317.10
8.0.250.0030.00317.09
8.0.240.0030.00617.14
8.0.230.0000.00717.18
8.0.220.0070.00017.13
8.0.210.0030.00317.00
8.0.200.0040.00417.04
8.0.190.0040.00417.17
8.0.180.0060.00317.12
8.0.170.0060.00317.06
8.0.160.0000.00716.99
8.0.150.0040.00417.09
8.0.140.0040.00416.99
8.0.130.0060.00013.50
8.0.120.0060.00317.06
8.0.110.0000.00717.12
8.0.100.0000.00716.94
8.0.90.0040.00417.13
8.0.80.0120.00317.07
8.0.70.0040.00417.01
8.0.60.0000.00817.11
8.0.50.0000.00717.22
8.0.30.0100.00917.15
8.0.20.0090.01017.51
8.0.10.0050.00317.18
8.0.00.0080.01616.85
7.4.330.0060.00015.04
7.4.320.0000.00616.83
7.4.300.0000.00616.74
7.4.290.0040.00416.75
7.4.280.0030.00516.66
7.4.270.0070.00016.77
7.4.260.0030.00516.71
7.4.250.0030.00616.72
7.4.240.0020.00616.80
7.4.230.0050.00316.54
7.4.220.0100.01016.69
7.4.210.0090.00816.80
7.4.200.0040.00416.63
7.4.190.0030.00316.87
7.4.160.0100.00716.71
7.4.150.0100.00817.40
7.4.140.0070.01317.86
7.4.130.0100.00816.69
7.4.120.0050.01516.72
7.4.110.0040.01516.68
7.4.100.0180.00416.79
7.4.90.0100.00716.71
7.4.80.0030.01316.68
7.4.70.0030.01416.61
7.4.60.0090.01216.57
7.4.50.0060.00316.87
7.4.40.0030.01322.77
7.4.30.0110.00616.56
7.4.00.0030.01215.21
7.3.330.0030.00313.43
7.3.320.0030.00313.38
7.3.310.0070.00016.39
7.3.300.0030.00316.36
7.3.290.0070.00716.60
7.3.280.0110.00916.56
7.3.270.0090.00817.40
7.3.260.0030.01716.46
7.3.250.0090.00816.72
7.3.240.0070.01116.82
7.3.230.0070.01016.64
7.3.210.0120.01616.73
7.3.200.0130.01319.39
7.3.190.0060.01216.80
7.3.180.0070.01016.64
7.3.170.0060.01016.75
7.3.160.0120.01016.74
7.3.120.0080.00914.84
7.3.110.0060.01315.14
7.3.100.0070.00715.04
7.3.90.0030.00715.06
7.3.80.0110.00614.98
7.3.70.0070.00415.05
7.3.60.0080.00815.00
7.3.50.0060.00315.00
7.3.40.0030.00615.12
7.3.30.0080.00414.85
7.3.20.0030.01316.86
7.3.10.0070.00416.91
7.3.00.0120.00416.85
7.2.330.0060.01216.72
7.2.320.0060.01616.87
7.2.310.0030.01316.86
7.2.300.0110.01016.96
7.2.290.0100.00716.65
7.2.250.0030.01615.29
7.2.240.0060.01215.20
7.2.230.0060.01215.25
7.2.220.0030.01115.16
7.2.210.0030.00715.43
7.2.200.0100.00615.39
7.2.190.0030.00915.05
7.2.180.0000.01415.12
7.2.170.0030.01015.06
7.2.00.0000.01519.71
7.1.330.0070.00716.07
7.1.320.0060.00616.00
7.1.310.0090.00316.08
7.1.300.0040.00815.77
7.1.290.0100.00715.98
7.1.280.0050.00915.71
7.1.270.0000.00915.85
7.1.260.0040.00716.16
7.1.100.0030.01017.91
7.1.70.0070.00017.52
7.1.60.0110.01419.82
7.1.50.0240.00934.56
7.1.00.0000.07722.61
7.0.200.0030.00516.68
7.0.140.0000.07722.18
7.0.60.0030.08319.97
7.0.50.0100.07317.83
7.0.40.0100.08720.32
7.0.30.0570.05320.10
7.0.20.0170.05020.20
7.0.10.0230.07320.04
7.0.00.0130.06720.03
5.6.280.0000.07721.15
5.6.210.0100.08320.53
5.6.200.0230.03018.21
5.6.190.0200.07720.55
5.6.180.3670.04720.68
5.6.170.0230.08320.54
5.6.160.0100.06020.41
5.6.150.0030.07318.25
5.6.140.0000.05318.23
5.6.130.0070.08318.16
5.6.120.0070.04021.04
5.6.110.0100.07321.02
5.6.100.0200.07320.98
5.6.90.0070.08321.05
5.6.80.0130.07720.53
5.5.350.0130.03720.36
5.5.340.0030.08017.96
5.5.330.0170.06320.13
5.5.320.0300.04720.56
5.5.310.0370.07020.26
5.5.300.0070.08017.97
5.5.290.0170.04317.99
5.5.280.0100.08320.92
5.5.270.0000.05020.64
5.5.260.0070.04020.91
5.5.250.0100.07020.49
5.5.240.3670.04020.30
5.4.450.0300.04319.39
5.4.440.0370.04319.25
5.4.430.0300.03319.48
5.4.420.0200.04019.41
5.4.410.0070.05718.99
5.4.400.0100.05318.62
5.4.390.0100.05318.68
5.4.380.0230.05018.60
5.4.370.0130.05318.60
5.4.360.0130.05318.49
5.4.350.0170.05318.62
5.4.340.0170.05018.62
5.4.320.0070.03612.52
5.4.310.0060.03712.51
5.4.300.0070.03512.51
5.4.290.0040.04212.51
5.4.280.0040.03712.41
5.4.270.0070.03412.41
5.4.260.0080.03512.41
5.4.250.0040.03912.41
5.4.240.0050.03712.41
5.4.230.0050.03912.40
5.4.220.0090.03212.40
5.4.210.0060.03412.40
5.4.200.0070.03612.40
5.4.190.0160.04512.40
5.4.180.0260.06312.40
5.4.170.0200.03912.43
5.4.160.0160.04312.42
5.4.150.0120.04712.42
5.4.140.0160.04112.10
5.4.130.0180.04012.09
5.4.120.0180.04112.04
5.4.110.0180.03912.04
5.4.100.0170.04312.04
5.4.90.0220.06812.02
5.4.80.0110.04912.04
5.4.70.0120.04412.03
5.4.60.0160.04112.04
5.4.50.0160.04012.00
5.4.40.0250.06411.98
5.4.30.0180.04111.98
5.4.20.0170.04011.98
5.4.10.0200.04111.98
5.4.00.0300.08711.46
5.3.290.0050.03912.80
5.3.280.0040.03812.71
5.3.270.0170.04612.73
5.3.260.0160.04912.72
5.3.250.0210.04312.72
5.3.240.0220.07112.72
5.3.230.0190.04412.71
5.3.220.0220.04112.68
5.3.210.0150.05012.68
5.3.200.0190.04712.68
5.3.190.0170.04412.67
5.3.180.0160.04412.67
5.3.170.0250.06712.67
5.3.160.0140.04912.67
5.3.150.0190.04512.68
5.3.140.0130.04712.66
5.3.130.0350.08612.66
5.3.120.0200.04112.66
5.3.110.0180.04512.66
5.3.100.0130.04712.12
5.3.90.0190.04012.11
5.3.80.0130.04612.09
5.3.70.0100.05012.09
5.3.60.0200.04412.07
5.3.50.0110.05012.02
5.3.40.0160.04312.02
5.3.30.0210.03811.99
5.3.20.0170.04111.77
5.3.10.0150.04111.73
5.3.00.0180.03911.71
5.2.170.0140.0339.22
5.2.160.0110.0359.21
5.2.150.0180.0599.21
5.2.140.0130.0359.22
5.2.130.0130.0339.17
5.2.120.0160.0329.18
5.2.110.0130.0349.18
5.2.100.0130.0339.18
5.2.90.0220.0569.17
5.2.80.0100.0389.16
5.2.70.0160.0319.16
5.2.60.0170.0359.13
5.2.50.0130.0359.09
5.2.40.0120.0359.07
5.2.30.0100.0379.04
5.2.20.0120.0359.04
5.2.10.0120.0348.95
5.2.00.0270.0798.80
5.1.60.0090.0318.10
5.1.50.0160.0278.09
5.1.40.0130.0278.07
5.1.30.0080.0348.43
5.1.20.0120.0318.45
5.1.10.0130.0298.18
5.1.00.0170.0298.18
5.0.50.0100.0236.66
5.0.40.0090.0236.51
5.0.30.0140.0606.32
5.0.20.0100.0236.30
5.0.10.0080.0256.28
5.0.00.0140.0616.27
4.4.90.0070.0184.78
4.4.80.0080.0174.75
4.4.70.0050.0214.76
4.4.60.0170.0434.76
4.4.50.0080.0174.77
4.4.40.0070.0324.71
4.4.30.0090.0184.76
4.4.20.0080.0174.84
4.4.10.0070.0184.85
4.4.00.0060.0304.76
4.3.110.0080.0174.66
4.3.100.0060.0184.66
4.3.90.0030.0214.64
4.3.80.0100.0254.58
4.3.70.0120.0144.63
4.3.60.0170.0374.63
4.3.50.0090.0194.63
4.3.40.0090.0264.54
4.3.30.0070.0193.31
4.3.20.0050.0193.31
4.3.10.0040.0183.27
4.3.00.0000.02013.07

preferences:
45.57 ms | 400 KiB | 5 Q