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($browser['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.0120.00916.75
8.3.50.0080.01122.20
8.3.40.0140.00719.08
8.3.30.0110.00719.18
8.3.20.0050.00320.18
8.3.10.0040.00423.45
8.3.00.0040.00420.94
8.2.180.0180.00416.50
8.2.170.0090.00622.96
8.2.160.0070.00720.52
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0070.00726.16
8.2.120.0030.00522.38
8.2.110.0030.00622.43
8.2.100.0090.00717.97
8.2.90.0000.00819.35
8.2.80.0080.00017.97
8.2.70.0000.00917.63
8.2.60.0040.00418.12
8.2.50.0000.00818.07
8.2.40.0080.00018.16
8.2.30.0040.00418.05
8.2.20.0060.00317.91
8.2.10.0000.00819.70
8.2.00.0040.00417.90
8.1.280.0140.00725.92
8.1.270.0080.00023.70
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0040.00423.79
8.1.230.0110.00019.28
8.1.220.0060.00317.90
8.1.210.0030.00518.77
8.1.200.0060.00317.73
8.1.190.0050.00317.66
8.1.180.0000.00918.10
8.1.170.0030.00718.86
8.1.160.0000.00822.08
8.1.150.0040.00418.77
8.1.140.0080.00017.67
8.1.130.0000.00717.80
8.1.120.0050.00217.60
8.1.110.0080.00017.71
8.1.100.0030.00517.58
8.1.90.0080.00017.66
8.1.80.0040.00417.64
8.1.70.0070.00017.60
8.1.60.0060.00317.78
8.1.50.0000.00917.63
8.1.40.0040.00417.60
8.1.30.0000.00817.73
8.1.20.0030.00517.85
8.1.10.0040.00417.77
8.1.00.0070.00417.70
8.0.300.0000.00718.77
8.0.290.0040.00417.30
8.0.280.0030.00418.38
8.0.270.0000.00717.36
8.0.260.0070.00016.98
8.0.250.0030.00317.19
8.0.240.0040.00417.21
8.0.230.0080.00017.27
8.0.220.0070.00017.10
8.0.210.0040.00317.02
8.0.200.0000.00617.18
8.0.190.0040.00417.12
8.0.180.0050.00217.05
8.0.170.0050.00317.20
8.0.160.0090.00017.27
8.0.150.0000.00717.04
8.0.140.0050.00317.08
8.0.130.0060.00013.53
8.0.120.0040.00417.00
8.0.110.0000.00816.96
8.0.100.0000.00816.94
8.0.90.0040.00417.06
8.0.80.0060.01017.14
8.0.70.0040.00416.94
8.0.60.0000.00717.17
8.0.50.0040.00417.14
8.0.30.0070.01417.27
8.0.20.0110.00817.54
8.0.10.0030.00517.08
8.0.00.0110.01516.93
7.4.330.0000.00515.05
7.4.320.0000.00616.86
7.4.300.0000.00616.77
7.4.290.0040.00416.82
7.4.280.0000.00716.85
7.4.270.0000.00816.81
7.4.260.0100.00016.76
7.4.250.0040.00416.85
7.4.240.0000.00816.76
7.4.230.0040.00416.65
7.4.220.0100.01016.95
7.4.210.0090.00916.89
7.4.200.0040.00416.65
7.4.190.0000.00716.66
7.4.160.0040.01216.74
7.4.150.0150.00417.40
7.4.140.0110.00817.86
7.4.130.0080.01116.83
7.4.120.0110.00716.70
7.4.110.0130.01016.87
7.4.100.0060.01316.79
7.4.90.0100.00716.94
7.4.80.0100.00716.91
7.4.70.0170.00716.80
7.4.60.0130.01016.92
7.4.50.0000.00616.72
7.4.40.0030.01322.77
7.4.30.0030.01316.91
7.4.10.0050.01516.12
7.4.00.0090.00815.64
7.3.330.0000.00513.30
7.3.320.0000.00613.40
7.3.310.0030.00316.60
7.3.300.0000.00716.63
7.3.290.0090.00916.61
7.3.280.0060.01216.63
7.3.270.0080.01217.40
7.3.260.0140.00516.67
7.3.250.0110.00916.71
7.3.240.0040.01516.58
7.3.230.0100.01316.67
7.3.210.0070.01016.63
7.3.200.0090.00919.39
7.3.190.0100.01216.65
7.3.180.0090.00916.77
7.3.170.0000.01716.46
7.3.160.0190.00316.80
7.3.130.0050.01515.76
7.3.120.0050.01215.51
7.3.110.0050.01415.45
7.3.100.0070.00915.58
7.3.90.0100.00415.48
7.3.80.0110.00415.59
7.3.70.0060.00915.54
7.3.60.0100.00615.56
7.3.50.0080.00815.49
7.3.40.0030.01115.46
7.3.30.0080.00615.54
7.3.20.0060.00817.32
7.3.10.0080.00717.15
7.3.00.0040.00817.24
7.2.330.0070.01316.90
7.2.320.0100.00716.88
7.2.310.0070.01817.02
7.2.300.0000.02016.66
7.2.290.0090.00917.02
7.2.260.0110.00915.92
7.2.250.0070.01115.70
7.2.240.0070.01215.89
7.2.230.0080.00615.71
7.2.220.0080.00715.74
7.2.210.0040.01115.79
7.2.200.0060.01115.76
7.2.190.0060.01015.77
7.2.180.0050.00715.68
7.2.170.0060.01115.69
7.2.160.0090.00616.01
7.2.150.0070.00917.99
7.2.140.0030.01017.93
7.2.130.0070.00917.59
7.2.120.0060.00917.71
7.2.110.0080.00817.67
7.2.100.0080.00817.63
7.2.90.0080.00617.70
7.2.80.0070.00817.66
7.2.70.0070.00917.68
7.2.60.0060.00917.63
7.2.50.0050.00917.57
7.2.40.0010.01317.76
7.2.30.0050.00817.63
7.2.20.0060.00817.59
7.2.10.0050.00817.68
7.2.00.0040.01017.61
7.1.330.0060.00816.59
7.1.320.0060.01016.58
7.1.310.0070.00616.52
7.1.300.0040.01116.54
7.1.290.0060.00816.50
7.1.280.0030.01016.60
7.1.270.0030.01216.57
7.1.260.0020.01016.44
7.1.250.0110.00416.44
7.1.240.0000.01416.75
7.1.230.0070.00516.84
7.1.220.0040.00716.88
7.1.210.0050.00516.66
7.1.200.0040.00716.63
7.1.190.0070.00616.63
7.1.180.0070.00716.85
7.1.170.0020.01316.73
7.1.160.0080.00516.81
7.1.150.0060.01016.78
7.1.140.0060.00616.62
7.1.130.0070.00916.84
7.1.120.0070.00716.85
7.1.110.0020.01216.84
7.1.100.0070.00816.94
7.1.90.0070.00916.73
7.1.80.0030.01116.75
7.1.70.0050.00416.95
7.1.60.0050.01217.62
7.1.50.0040.01416.92
7.1.40.0040.01016.67
7.1.30.0050.00816.61
7.1.20.0050.00916.76
7.1.10.0020.01216.74
7.1.00.0060.02918.64
7.0.330.0040.01216.48
7.0.320.0030.01016.29
7.0.310.0070.00716.42
7.0.300.0060.00516.30
7.0.290.0090.00716.46
7.0.280.0020.00916.32
7.0.270.0060.00816.55
7.0.260.0050.00816.27
7.0.250.0030.00916.54
7.0.240.0090.00716.51
7.0.230.0080.00716.39
7.0.220.0090.00516.25
7.0.210.0080.00616.37
7.0.200.0070.00516.49
7.0.190.0070.00516.33
7.0.180.0080.00716.34
7.0.170.0080.00716.41
7.0.160.0030.01016.32
7.0.150.0050.00716.32
7.0.140.0060.02818.41
7.0.130.0060.00816.37
7.0.120.0100.00816.38
7.0.110.0060.00816.24
7.0.100.0040.02217.58
7.0.90.0020.02617.71
7.0.80.0100.02817.58
7.0.70.0150.03317.63
7.0.60.0090.03617.53
7.0.50.0070.03117.58
7.0.40.0120.02416.29
7.0.30.0060.03216.32
7.0.20.0080.03316.35
7.0.10.0110.02816.19
7.0.00.0080.03216.31
5.6.400.0060.01015.21
5.6.390.0050.01015.27
5.6.380.0050.00715.40
5.6.370.0040.00915.32
5.6.360.0080.00815.47
5.6.350.0040.01214.99
5.6.340.0060.00715.30
5.6.330.0040.00915.31
5.6.320.0050.00715.13
5.6.310.0110.00315.41
5.6.300.0060.00815.31
5.6.290.0100.00515.22
5.6.280.0060.02817.25
5.6.270.0080.00715.42
5.6.260.0110.00715.34
5.6.250.0050.02017.18
5.6.240.0050.03717.10
5.6.230.0140.02717.08
5.6.220.0050.03017.02
5.6.210.0070.02317.17
5.6.200.0070.03317.27
5.6.190.0090.02517.20
5.6.180.0060.02217.24
5.6.170.0100.02217.14
5.6.160.0050.02417.31
5.6.150.0110.03017.27
5.6.140.0110.03017.16
5.6.130.0050.03517.27
5.6.120.0070.03317.12
5.6.110.0050.03517.18
5.6.100.0050.02817.18
5.6.90.0080.03017.35
5.6.80.0100.02916.94
5.6.70.0080.02416.88
5.6.60.0060.01916.94
5.6.50.0070.02716.86
5.6.40.0090.03617.14
5.6.30.0110.03116.94
5.6.20.0080.03117.01
5.6.10.0060.03216.96
5.6.00.0060.03016.99
5.5.380.0070.03016.93
5.5.370.0100.03416.97
5.5.360.0050.03517.09
5.5.350.0050.03516.94
5.5.340.0070.03717.25
5.5.330.0150.02917.16
5.5.320.0110.02017.19
5.5.310.0090.03416.96
5.5.300.0120.03217.13
5.5.290.0100.03217.17
5.5.280.0080.02317.05
5.5.270.0070.02717.03
5.5.260.0070.02917.15
5.5.250.0060.02417.04
5.5.240.0050.03416.92
5.5.230.0080.03516.99
5.5.220.0080.03116.96
5.5.210.0050.03116.94
5.5.200.0100.02816.79
5.5.190.0080.03216.81
5.5.180.0090.02916.91
5.5.170.0030.01015.09
5.5.160.0080.02016.99
5.5.150.0060.02916.88
5.5.140.0050.02016.81
5.5.130.0030.03216.86
5.5.120.0090.02816.84
5.5.110.0080.01716.92
5.5.100.0060.03316.99
5.5.90.0040.02216.67
5.5.80.0070.03016.63
5.5.70.0090.01816.80
5.5.60.0080.02016.85
5.5.50.0060.03016.69
5.5.40.0060.02316.87
5.5.30.0030.02616.87
5.5.20.0100.02916.88
5.5.10.0060.01916.91
5.5.00.0080.03216.76
5.4.450.0060.02014.76
5.4.440.0070.02514.76
5.4.430.0040.03014.66
5.4.420.0040.03214.82
5.4.410.0080.02614.74
5.4.400.0050.03014.64
5.4.390.0120.02714.67
5.4.380.0070.02914.61
5.4.370.0080.02114.66
5.4.360.0110.02814.67
5.4.350.0040.01914.66
5.4.340.0040.03114.59
5.4.330.0050.00512.44
5.4.320.0040.02414.65
5.4.310.0050.02814.64
5.4.300.0070.02614.55
5.4.290.0040.03014.60
5.4.280.0070.02914.61
5.4.270.0080.02314.72
5.4.260.0060.01814.55
5.4.250.0100.02314.67
5.4.240.0070.02414.60
5.4.230.0030.03314.60
5.4.220.0060.02114.67
5.4.210.0110.02214.66
5.4.200.0060.02614.59
5.4.190.0020.03214.70
5.4.180.0070.01814.60
5.4.170.0080.01514.65
5.4.160.0050.02514.54
5.4.150.0070.02414.60
5.4.140.0040.02713.77
5.4.130.0060.01613.80
5.4.120.0080.02513.75
5.4.110.0070.02413.79
5.4.100.0050.01713.79
5.4.90.0040.03213.77
5.4.80.0030.03213.81
5.4.70.0060.01613.71
5.4.60.0070.02613.74
5.4.50.0040.02713.71
5.4.40.0040.02913.78
5.4.30.0080.02613.75
5.4.20.0080.02113.72
5.4.10.0060.02313.81
5.4.00.0050.02813.61
5.3.290.0050.01913.36
5.3.280.0030.02913.22
5.3.270.0080.02813.28
5.3.260.0060.03113.37
5.3.250.0050.02813.28
5.3.240.0060.02913.23
5.3.230.0070.02613.25
5.3.220.0030.01913.29
5.3.210.0080.02513.25
5.3.200.0040.03113.23
5.3.190.0030.02713.27
5.3.180.0040.02513.37
5.3.170.0050.03113.31
5.3.160.0050.02913.38
5.3.150.0020.02913.34
5.3.140.0030.03013.35
5.3.130.0050.03113.36
5.3.120.0040.02913.37
5.3.110.0050.02713.26
5.3.100.0070.02613.16
5.3.90.0040.02813.19
5.3.80.0080.01713.08
5.3.70.0050.03013.11
5.3.60.0040.03013.10
5.3.50.0050.02213.12
5.3.40.0040.03013.05
5.3.30.0050.02213.00
5.3.20.0030.03112.93
5.3.10.0030.02612.86
5.3.00.0100.02012.85
5.2.170.0030.05711.17
5.2.160.0070.05710.92
5.2.150.0130.06010.97
5.2.140.0070.05711.16
5.2.130.0130.05311.13
5.2.120.0070.05711.09
5.2.110.0030.06311.05
5.2.100.0100.05711.14
5.2.90.0070.06011.17
5.2.80.0070.06010.95
5.2.70.0100.04310.98
5.2.60.0070.06310.93
5.2.50.0070.05310.91
5.2.40.0030.05311.08
5.2.30.0070.04710.80
5.2.20.0030.04310.98
5.2.10.0000.05710.93
5.2.00.0030.06010.69
5.1.60.0100.04010.05
5.1.50.0030.04010.07
5.1.40.0030.05010.09
5.1.30.0100.05010.28
5.1.20.0070.05310.43
5.1.10.0030.05710.11
5.1.00.0030.03710.13
5.0.50.0030.0478.61
5.0.40.0000.0308.43
5.0.30.0070.0608.27
5.0.20.0070.0338.21
5.0.10.0070.0408.20
5.0.00.0000.0508.29
4.4.90.0000.0338.02
4.4.80.0000.0208.02
4.4.70.0030.0378.02
4.4.60.0030.0378.02
4.4.50.0030.0178.02
4.4.40.0000.0338.02
4.4.30.0030.0338.02
4.4.20.0000.0338.02
4.4.10.0030.0378.02
4.4.00.0000.0338.02
4.3.110.0070.0138.02
4.3.100.0030.0308.02
4.3.90.0000.0338.02
4.3.80.0030.0508.02
4.3.70.0030.0238.02
4.3.60.0000.0408.02
4.3.50.0070.0308.02
4.3.40.0030.0508.02
4.3.30.0030.0378.02
4.3.20.0000.0378.02
4.3.10.0000.0208.02
4.3.00.0070.0278.02

preferences:
42.36 ms | 401 KiB | 5 Q