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.0150.00017.13
8.3.50.0080.01122.19
8.3.40.0090.00619.10
8.3.30.0110.00419.13
8.3.20.0040.00420.25
8.3.10.0000.00823.49
8.3.00.0080.00020.53
8.2.180.0160.00316.88
8.2.170.0030.01722.96
8.2.160.0090.00622.38
8.2.150.0040.00424.18
8.2.140.0030.00524.66
8.2.130.0080.00026.16
8.2.120.0050.00322.38
8.2.110.0040.00420.96
8.2.100.0110.00020.55
8.2.90.0070.00419.39
8.2.80.0000.00817.97
8.2.70.0000.00818.04
8.2.60.0000.00818.04
8.2.50.0090.00018.10
8.2.40.0040.00420.47
8.2.30.0080.00018.16
8.2.20.0030.00617.78
8.2.10.0000.00817.99
8.2.00.0000.00817.86
8.1.280.0070.00725.92
8.1.270.0060.00923.92
8.1.260.0060.00326.35
8.1.250.0040.00428.09
8.1.240.0030.00722.25
8.1.230.0040.00719.16
8.1.220.0030.00617.74
8.1.210.0030.00518.77
8.1.200.0070.00317.35
8.1.190.0060.00317.35
8.1.180.0030.00518.10
8.1.170.0050.00318.70
8.1.160.0000.00722.21
8.1.150.0040.00418.83
8.1.140.0030.00517.69
8.1.130.0070.00017.79
8.1.120.0040.00417.53
8.1.110.0030.00617.57
8.1.100.0000.00817.59
8.1.90.0000.00717.54
8.1.80.0070.00017.53
8.1.70.0070.00017.57
8.1.60.0090.00017.79
8.1.50.0000.00917.71
8.1.40.0040.00417.71
8.1.30.0000.00917.80
8.1.20.0040.00417.73
8.1.10.0060.00317.57
8.1.00.0030.00517.63
8.0.300.0030.00519.85
8.0.290.0040.00417.00
8.0.280.0000.00718.49
8.0.270.0000.00717.22
8.0.260.0030.00316.96
8.0.250.0080.00017.09
8.0.240.0000.00717.07
8.0.230.0000.00717.05
8.0.220.0070.00017.04
8.0.210.0030.00317.02
8.0.200.0040.00417.14
8.0.190.0090.00017.08
8.0.180.0000.00717.07
8.0.170.0050.00317.18
8.0.160.0050.00217.10
8.0.150.0000.00717.06
8.0.140.0030.00617.04
8.0.130.0030.00313.55
8.0.120.0000.00817.12
8.0.110.0040.00417.19
8.0.100.0080.00017.00
8.0.90.0000.00817.09
8.0.80.0060.00917.01
8.0.70.0040.00417.19
8.0.60.0080.00017.03
8.0.50.0040.00417.12
8.0.30.0160.00917.20
8.0.20.0140.00517.40
8.0.10.0000.00717.14
8.0.00.0090.01016.96
7.4.330.0030.00315.02
7.4.320.0000.00616.83
7.4.300.0000.00716.83
7.4.290.0000.00716.75
7.4.280.0030.00616.84
7.4.270.0030.00316.75
7.4.260.0030.00416.70
7.4.250.0070.00016.72
7.4.240.0020.00616.83
7.4.230.0050.00216.86
7.4.220.0000.01816.95
7.4.210.0090.00616.75
7.4.200.0030.00616.93
7.4.190.0040.00416.79
7.4.160.0160.00316.70
7.4.150.0080.00817.40
7.4.140.0150.00717.86
7.4.130.0110.00916.66
7.4.120.0060.01416.62
7.4.110.0120.00616.81
7.4.100.0110.01616.71
7.4.90.0150.00616.60
7.4.80.0040.01616.80
7.4.70.0070.01716.63
7.4.60.0120.00616.79
7.4.50.0050.00016.49
7.4.40.0090.00622.77
7.4.30.0090.00916.78
7.4.10.0030.00915.04
7.4.00.0070.01015.18
7.3.330.0060.00013.43
7.3.320.0030.00313.54
7.3.310.0040.00416.65
7.3.300.0000.00716.55
7.3.290.0090.01016.57
7.3.280.0060.01116.58
7.3.270.0030.01517.40
7.3.260.0170.00716.46
7.3.250.0110.01116.46
7.3.240.0110.01416.82
7.3.230.0030.01416.62
7.3.210.0200.00316.39
7.3.200.0120.00919.39
7.3.190.0090.00916.64
7.3.180.0130.00316.81
7.3.170.0070.01516.75
7.3.160.0080.01216.55
7.3.130.0110.00815.18
7.3.120.0090.00915.23
7.3.110.0070.01115.09
7.3.100.0060.00814.83
7.3.90.0100.00414.98
7.3.80.0070.00515.08
7.3.70.0020.01015.03
7.3.60.0050.00514.99
7.3.50.0050.00514.93
7.3.40.0030.01215.06
7.3.30.0020.01415.12
7.3.20.0060.00616.86
7.3.10.0100.00316.92
7.3.00.0060.00716.83
7.2.330.0060.01316.82
7.2.320.0090.00916.64
7.2.310.0130.00616.73
7.2.300.0100.01416.80
7.2.290.0140.00316.70
7.2.260.0070.01115.39
7.2.250.0110.00715.10
7.2.240.0070.01115.32
7.2.230.0070.00915.19
7.2.220.0090.00315.10
7.2.210.0010.00815.29
7.2.200.0070.00915.27
7.2.190.0080.00315.26
7.2.180.0070.00715.21
7.2.170.0070.01015.25
7.2.160.0040.01215.01
7.2.150.0070.00417.17
7.2.140.0000.01316.87
7.2.130.0080.00817.06
7.2.120.0090.00816.94
7.2.110.0020.01317.14
7.2.100.0070.00717.16
7.2.90.0070.00417.05
7.2.80.0070.00617.26
7.2.70.0100.00317.17
7.2.60.0030.01116.95
7.2.50.0060.00717.24
7.2.40.0050.01116.96
7.2.30.0060.01116.96
7.2.20.0060.01017.22
7.2.10.0060.00817.08
7.2.00.0070.00917.96
7.1.330.0060.00916.05
7.1.320.0080.00515.92
7.1.310.0030.00816.00
7.1.300.0090.00416.07
7.1.290.0070.00516.06
7.1.280.0060.00815.88
7.1.270.0000.01215.86
7.1.260.0060.00815.87
7.1.250.0020.01415.81
7.1.240.0000.01416.16
7.1.230.0110.00415.91
7.1.220.0030.01015.77
7.1.210.0090.00615.90
7.1.200.0030.00615.94
7.1.190.0030.01216.07
7.1.180.0000.01415.91
7.1.170.0000.00916.19
7.1.160.0030.01316.20
7.1.150.0070.00716.16
7.1.140.0000.01315.80
7.1.130.0070.00715.86
7.1.120.0060.00915.79
7.1.110.0070.01116.05
7.1.100.0030.00917.26
7.1.90.0070.00716.07
7.1.80.0070.00716.19
7.1.70.0020.00816.68
7.1.60.0090.00817.49
7.1.50.0040.01416.53
7.1.40.0030.01015.77
7.1.30.0110.00415.86
7.1.20.0070.00716.05
7.1.10.0000.01116.18
7.1.00.0070.03719.14
7.0.330.0060.01015.41
7.0.320.0000.01215.29
7.0.310.0030.01015.27
7.0.300.0000.00915.74
7.0.290.0100.00615.71
7.0.280.0080.00315.45
7.0.270.0030.01015.55
7.0.260.0070.01015.55
7.0.250.0040.01115.64
7.0.240.0080.00415.41
7.0.230.0030.00715.51
7.0.220.0060.00315.38
7.0.210.0070.00715.66
7.0.200.0050.00916.38
7.0.190.0050.00515.80
7.0.180.0050.00315.47
7.0.170.0070.00715.59
7.0.160.0110.00415.73
7.0.150.0070.00415.49
7.0.140.0020.04318.83
7.0.130.0060.00615.65
7.0.120.0070.00715.72
7.0.110.0030.01015.62
7.0.100.0030.01015.43
7.0.90.0050.04717.58
7.0.80.0080.03317.75
7.0.70.0030.04617.88
7.0.60.0020.04817.72
7.0.50.0060.03617.85
7.0.40.0080.04516.88
7.0.30.0110.04116.66
7.0.20.0080.03016.93
7.0.10.0080.04516.84
7.0.00.0120.04316.96
5.6.400.0070.00714.50
5.6.390.0090.00614.44
5.6.380.0070.00714.34
5.6.370.0030.01014.65
5.6.360.0000.01014.33
5.6.350.0040.01114.56
5.6.340.0060.00614.75
5.6.330.0000.01414.40
5.6.320.0040.01414.42
5.6.310.0060.00314.52
5.6.300.0110.00413.94
5.6.290.0110.00414.35
5.6.280.0040.04217.63
5.6.270.0030.01014.31
5.6.260.0120.00314.39
5.6.250.0080.00814.46
5.6.240.0000.01214.59
5.6.230.0080.04717.53
5.6.220.0070.04217.53
5.6.210.0080.02617.66
5.6.200.0040.03417.67
5.6.190.0160.03817.70
5.6.180.0020.05317.64
5.6.170.0050.04217.88
5.6.160.0080.04217.75
5.6.150.0070.04417.80
5.6.140.0070.03017.72
5.6.130.0090.03917.78
5.6.120.0050.04817.90
5.6.110.0050.02817.82
5.6.100.0050.02917.75
5.6.90.0020.02817.97
5.6.80.0100.02417.33
5.6.70.0050.04517.33
5.6.60.0070.02717.39
5.6.50.0120.03617.28
5.6.40.0050.02917.56
5.6.30.0090.04417.35
5.6.20.0080.03517.45
5.6.10.0090.04417.34
5.6.00.0100.03817.38
5.5.380.0100.00014.24
5.5.370.0070.04317.41
5.5.360.0070.02417.39
5.5.350.0030.04517.44
5.5.340.0090.02717.64
5.5.330.0150.04317.55
5.5.320.0050.03317.51
5.5.310.0100.04217.63
5.5.300.0130.02517.58
5.5.290.0060.04017.47
5.5.280.0070.02817.73
5.5.270.0050.02817.58
5.5.260.0100.02517.50
5.5.250.0110.02017.47
5.5.240.0080.04517.19
5.5.230.0030.04317.44
5.5.220.0030.03117.14
5.5.210.0130.02017.19
5.5.200.0090.04517.29
5.5.190.0100.02317.15
5.5.180.0050.04417.20
5.5.170.0080.00514.41
5.5.160.0040.04217.08
5.5.150.0050.02817.06
5.5.140.0060.04117.32
5.5.130.0060.04617.12
5.5.120.0070.04217.39
5.5.110.0080.04117.25
5.5.100.0020.03817.23
5.5.90.0030.04617.34
5.5.80.0070.04517.29
5.5.70.0080.04317.18
5.5.60.0100.04017.07
5.5.50.0130.03717.10
5.5.40.0070.03817.14
5.5.30.0050.04117.34
5.5.20.0050.04117.14
5.5.10.0030.04717.21
5.5.00.0060.02817.15
5.4.450.0050.04115.88
5.4.440.0030.02715.72
5.4.430.0030.03215.86
5.4.420.0030.03515.85
5.4.410.0080.01915.83
5.4.400.0020.03615.64
5.4.390.0070.02215.66
5.4.380.0030.03415.71
5.4.370.0050.03815.70
5.4.360.0070.02615.66
5.4.350.0070.02815.70
5.4.340.0030.03115.66
5.4.330.0030.00812.35
5.4.320.0030.04415.74
5.4.310.0110.03515.70
5.4.300.0030.04215.58
5.4.290.0110.03515.75
5.4.280.0030.04315.77
5.4.270.0070.03815.71
5.4.260.0070.04115.71
5.4.250.0050.04315.66
5.4.240.0070.04315.71
5.4.230.0040.03915.73
5.4.220.0090.02815.79
5.4.210.0100.03615.62
5.4.200.0080.02515.74
5.4.190.0100.03515.70
5.4.180.0070.04015.71
5.4.170.0050.02515.74
5.4.160.0080.03815.71
5.4.150.0050.04515.65
5.4.140.0040.03814.37
5.4.130.0100.03614.31
5.4.120.0050.03814.36
5.4.110.0050.02914.31
5.4.100.0030.04014.39
5.4.90.0080.04014.34
5.4.80.0050.04114.37
5.4.70.0030.04114.36
5.4.60.0050.02614.35
5.4.50.0050.03414.33
5.4.40.0030.04014.40
5.4.30.0050.03714.28
5.4.20.0130.02814.28
5.4.10.0030.04514.32
5.4.00.0050.03913.96
5.3.290.0060.04013.52
5.3.280.0050.04313.49
5.3.270.0060.02413.46
5.3.260.0070.04113.42
5.3.250.0010.04313.48
5.3.240.0080.01913.48
5.3.230.0140.03513.42
5.3.220.0100.02513.47
5.3.210.0070.02013.47
5.3.200.0050.04413.43
5.3.190.0090.02213.40
5.3.180.0070.03813.46
5.3.170.0100.03213.47
5.3.160.0080.03313.46
5.3.150.0050.02113.38
5.3.140.0080.03713.46
5.3.130.0100.03713.41
5.3.120.0050.04113.44
5.3.110.0050.02913.39
5.3.100.0080.03713.19
5.3.90.0100.03513.20
5.3.80.0050.03813.16
5.3.70.0070.04013.07
5.3.60.0080.03813.17
5.3.50.0130.03313.15
5.3.40.0050.03113.15
5.3.30.0070.03913.13
5.3.20.0000.04012.97
5.3.10.0090.03512.97
5.3.00.0000.04312.99
5.2.170.0070.04713.60
5.2.160.0000.06313.60
5.2.150.0030.06313.60
5.2.140.0030.06013.60
5.2.130.0070.06013.60
5.2.120.0000.06713.60
5.2.110.0000.06713.60
5.2.100.0000.06713.60
5.2.90.0070.06013.60
5.2.80.0130.05313.60
5.2.70.0070.06013.60
5.2.60.0130.04713.60
5.2.50.0070.04713.60
5.2.40.0030.06313.60
5.2.30.0000.06013.60
5.2.20.0100.04713.60
5.2.10.0030.05313.60
5.2.00.0000.04013.60
5.1.60.0070.04313.60
5.1.50.0030.03313.60
5.1.40.0130.03013.60
5.1.30.0100.05713.60
5.1.20.0030.06313.60
5.1.10.0070.05313.60
5.1.00.0070.05713.60
5.0.50.0030.03313.60
5.0.40.0030.03313.60
5.0.30.0030.04313.60
5.0.20.0100.03313.60
5.0.10.0030.04713.60
5.0.00.0030.06313.60
4.4.90.0000.03713.60
4.4.80.0000.03713.60
4.4.70.0000.03713.60
4.4.60.0030.03313.60
4.4.50.0000.04013.60
4.4.40.0070.04313.60
4.4.30.0000.03713.60
4.4.20.0000.03713.60
4.4.10.0000.02313.60
4.4.00.0030.05013.60
4.3.110.0030.03713.60
4.3.100.0000.03313.60
4.3.90.0000.02713.60
4.3.80.0000.05313.60
4.3.70.0000.03013.60
4.3.60.0030.03313.60
4.3.50.0000.03713.60
4.3.40.0000.05313.60
4.3.30.0070.03013.60
4.3.20.0000.03713.60
4.3.10.0030.03013.60
4.3.00.0000.02713.60

preferences:
52.93 ms | 401 KiB | 5 Q