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.0240.00318.56
8.3.50.0080.01722.11
8.3.40.0110.00719.04
8.3.30.0000.01518.93
8.3.20.0100.00318.98
8.3.10.0030.00521.06
8.3.00.0000.00823.84
8.2.180.0070.00716.88
8.2.170.0110.00422.96
8.2.160.0110.00320.39
8.2.150.0080.00024.18
8.2.140.0060.00924.66
8.2.130.0040.00426.16
8.2.120.0070.00417.75
8.2.110.0070.00321.07
8.2.100.0090.00317.97
8.2.90.0040.00419.18
8.2.80.0040.00417.97
8.2.70.0030.00617.88
8.2.60.0040.00418.03
8.2.50.0040.00418.07
8.2.40.0040.00418.23
8.2.30.0030.00719.55
8.2.20.0000.00819.66
8.2.10.0060.00318.04
8.2.00.0040.00417.92
8.1.280.0110.00425.92
8.1.270.0030.00724.16
8.1.260.0050.00326.35
8.1.250.0080.00028.09
8.1.240.0040.00421.44
8.1.230.0060.00617.77
8.1.220.0000.00917.80
8.1.210.0000.00918.77
8.1.200.0030.00617.60
8.1.190.0030.00617.60
8.1.180.0030.00518.10
8.1.170.0040.00418.74
8.1.160.0060.00318.96
8.1.150.0040.00418.82
8.1.140.0030.00517.50
8.1.130.0040.00417.89
8.1.120.0080.00017.55
8.1.110.0040.00417.64
8.1.100.0080.00017.59
8.1.90.0040.00417.68
8.1.80.0040.00417.53
8.1.70.0070.00017.55
8.1.60.0090.00317.76
8.1.50.0030.00517.71
8.1.40.0080.00017.65
8.1.30.0030.00517.86
8.1.20.0090.00017.68
8.1.10.0000.00817.70
8.1.00.0040.00417.74
8.0.300.0040.00418.77
8.0.290.0050.00316.88
8.0.280.0040.00418.55
8.0.270.0070.00017.39
8.0.260.0000.00717.02
8.0.250.0080.00017.18
8.0.240.0000.01217.09
8.0.230.0080.00017.22
8.0.220.0040.00417.14
8.0.210.0000.00717.03
8.0.200.0030.00317.09
8.0.190.0040.00417.11
8.0.180.0030.00517.10
8.0.170.0000.00717.12
8.0.160.0000.00717.04
8.0.150.0030.00617.09
8.0.140.0040.00417.16
8.0.130.0060.00013.63
8.0.120.0000.00917.00
8.0.110.0060.00316.96
8.0.100.0070.00317.20
8.0.90.0070.00017.01
8.0.80.0080.00817.13
8.0.70.0040.00416.99
8.0.60.0000.00817.13
8.0.50.0000.00817.16
8.0.30.0080.01317.36
8.0.20.0100.01017.40
8.0.10.0050.00317.15
8.0.00.0150.00917.13
7.4.330.0000.00516.88
7.4.320.0000.00716.83
7.4.300.0030.00316.86
7.4.290.0000.00716.73
7.4.280.0040.00416.84
7.4.270.0030.00516.77
7.4.260.0060.00013.52
7.4.250.0060.00316.84
7.4.240.0070.00016.71
7.4.230.0000.00716.64
7.4.220.0100.01016.70
7.4.210.0070.01016.81
7.4.200.0000.00816.73
7.4.190.0040.00416.71
7.4.160.0060.01016.55
7.4.150.0090.00917.40
7.4.140.0070.01117.86
7.4.130.0100.00816.65
7.4.120.0100.00816.73
7.4.110.0150.00416.68
7.4.100.0090.00916.57
7.4.90.0100.01016.83
7.4.80.0000.02119.39
7.4.70.0040.01316.76
7.4.60.0050.01716.99
7.4.50.0030.00616.60
7.4.40.0050.00522.77
7.4.30.0150.00916.73
7.4.00.0030.01415.08
7.3.330.0000.00513.48
7.3.320.0060.00013.46
7.3.310.0030.00416.43
7.3.300.0030.00316.57
7.3.290.0030.01316.61
7.3.280.0090.00716.62
7.3.270.0150.00317.40
7.3.260.0110.00918.24
7.3.250.0090.01016.54
7.3.240.0110.01116.59
7.3.230.0130.00316.78
7.3.210.0150.00316.68
7.3.200.0090.01619.39
7.3.190.0090.01616.72
7.3.180.0000.01616.51
7.3.170.0140.00316.79
7.3.160.0110.01116.73
7.3.120.0060.01115.16
7.3.110.0110.00715.09
7.3.100.0120.00415.35
7.3.90.0100.01015.00
7.3.80.0000.00915.14
7.3.70.0100.00315.30
7.3.60.0070.01115.11
7.3.50.0000.01415.23
7.3.40.0150.00315.13
7.3.30.0060.00615.14
7.3.20.0030.01317.08
7.3.10.0110.00716.73
7.3.00.0080.00816.77
7.2.330.0120.00616.72
7.2.320.0060.01216.74
7.2.310.0060.01216.94
7.2.300.0080.01516.99
7.2.290.0000.01817.05
7.2.250.0090.00915.08
7.2.240.0140.00715.39
7.2.230.0130.01015.37
7.2.220.0030.00915.37
7.2.210.0110.00315.14
7.2.200.0120.00015.35
7.2.190.0060.00615.37
7.2.180.0030.01015.26
7.2.170.0040.01515.51
7.2.60.0060.00817.04
7.1.330.0040.01116.03
7.1.320.0070.00716.09
7.1.310.0150.00015.99
7.1.300.0070.01116.10
7.1.290.0030.01216.26
7.1.280.0030.01015.79
7.1.270.0000.01516.13
7.1.260.0040.01116.09
7.1.200.0180.01415.84
7.1.100.0060.00618.48
7.1.70.0030.00617.31
7.1.60.0030.01417.64
7.1.50.0030.00716.94
7.1.40.0110.00416.99
7.1.30.0000.01117.05
7.1.20.0110.00417.14
7.1.10.0030.00516.75
7.1.00.0060.00616.97
7.0.200.0040.00416.91
7.0.190.0070.00316.72
7.0.180.0030.00716.74
7.0.170.0100.00316.71
7.0.160.0080.00316.43
7.0.150.0000.00816.43
7.0.140.0000.00816.75
7.0.130.0040.01116.78
7.0.120.0030.00616.81
7.0.110.0000.00816.67
7.0.100.0000.01116.70
7.0.90.0040.00716.44
7.0.80.0030.00516.82
7.0.70.0030.00716.61
7.0.60.0050.00516.52
7.0.50.0030.00516.61
7.0.40.0000.01116.37
7.0.30.0070.00316.37
7.0.20.0040.00416.37
7.0.10.0090.00316.37
7.0.00.0040.00416.37
5.6.300.0100.04220.82
5.6.290.0130.03520.90
5.6.280.0030.04321.10
5.6.270.0060.04521.10
5.6.260.0070.03621.09
5.6.250.0030.04521.11
5.6.240.0000.05521.09
5.6.230.0030.04621.04
5.6.220.0070.04620.96
5.6.210.0070.04620.61
5.6.200.0000.08020.86
5.6.190.0070.04420.98
5.6.180.0030.04020.90
5.6.170.0070.03820.86
5.6.160.0070.03720.86
5.6.150.0000.05921.00
5.6.140.0070.04620.85
5.6.130.0030.04121.01
5.6.120.0030.04620.95
5.6.110.0070.05020.97
5.6.100.0090.03420.84
5.6.90.0040.04221.03
5.6.80.0100.04320.43
5.6.70.0030.05220.43
5.6.60.0030.05920.19
5.6.50.0030.04720.44
5.6.40.0000.05020.41
5.6.30.0030.04220.32
5.6.20.0030.03920.17
5.6.10.0000.06520.43
5.6.00.0030.04020.41
5.5.380.0040.04217.51
5.5.370.0060.03817.48
5.5.360.0000.05417.42
5.5.350.0030.04217.40
5.5.340.0070.06517.78
5.5.330.0000.08317.89
5.5.320.0070.04517.77
5.5.310.0060.04917.97
5.5.300.0030.05117.89
5.5.290.0070.04417.87
5.5.280.0100.05917.89
5.5.270.0030.04018.09
5.5.260.0070.06918.04
5.5.250.0060.04217.88
5.5.240.0100.03317.36
5.5.230.0030.04117.35
5.5.220.0000.05417.15
5.5.210.0060.03517.44
5.5.200.0070.03317.36
5.5.190.0100.05417.41
5.5.180.0000.05117.41
5.5.160.0030.06617.33
5.5.150.0030.04517.08
5.5.140.0000.04917.12
5.5.130.0100.03717.24
5.5.120.0030.04417.44
5.5.110.0060.04017.34
5.5.100.0070.03417.32
5.5.90.0000.04017.34
5.5.80.0000.03817.30
5.5.70.0060.03617.38
5.5.60.0000.04717.23
5.5.50.0030.03917.38
5.5.40.0060.03517.38
5.5.30.0030.03917.30
5.5.20.0070.03817.33
5.5.10.0000.04317.11
5.5.00.0060.03917.12
5.4.450.0030.04719.36
5.4.440.0030.04919.47
5.4.430.0030.04219.34
5.4.420.0000.04419.49
5.4.410.0070.04219.05
5.4.400.0000.04119.10
5.4.390.0060.03519.07
5.4.380.0070.06319.10
5.4.370.0030.03819.05
5.4.360.0070.04918.86
5.4.350.0040.03518.86
5.4.340.0060.03919.20
5.4.320.0060.03419.05
5.4.310.0130.03319.14
5.4.300.0030.04418.98
5.4.290.0070.03719.10
5.4.280.0070.04519.01
5.4.270.0070.03718.82
5.4.260.0070.03719.02
5.4.250.0070.03319.02
5.4.240.0070.04019.02
5.4.230.0100.03218.89
5.4.220.0030.04418.83
5.4.210.0100.04919.09
5.4.200.0070.04319.00
5.4.190.0030.03618.91
5.4.180.0070.04019.06
5.4.170.0000.04219.05
5.4.160.0030.04618.98
5.4.150.0070.03719.04
5.4.140.0060.03816.57
5.4.130.0060.03516.66
5.4.120.0070.03816.60
5.4.110.0070.04916.64
5.4.100.0000.03816.51
5.4.90.0030.04816.37
5.4.80.0030.03816.48
5.4.70.0000.04716.55
5.4.60.0070.03416.59
5.4.50.0000.03816.37
5.4.40.0030.03916.56
5.4.30.0070.03216.37
5.4.20.0000.03816.63
5.4.10.0070.03916.62
5.4.00.0000.04116.37
5.3.290.0260.04916.37
5.3.280.0090.02816.37
5.3.270.0000.05916.37
5.3.260.0030.04116.37
5.3.250.0000.04116.37
5.3.240.0000.03816.37
5.3.230.0000.04216.37
5.3.220.0070.03316.37
5.3.210.0100.03616.37
5.3.200.0030.04016.37
5.3.190.0100.03816.37
5.3.180.0000.03916.37
5.3.170.0040.03916.37
5.3.160.0000.04416.37
5.3.150.0030.04716.37
5.3.140.0000.04316.37
5.3.130.0000.04816.37
5.3.120.0030.04916.37
5.3.110.0000.04816.37
5.3.100.0040.03516.37
5.3.90.0070.05516.37
5.3.80.0000.05416.37
5.3.70.0140.04016.37
5.3.60.0060.03716.37
5.3.50.0030.03416.37
5.3.40.0070.03616.37
5.3.30.0000.04116.37
5.3.20.0300.02116.37
5.3.10.0000.04616.37
5.3.00.0070.03616.37
5.2.170.0060.02716.37
5.2.160.0060.03516.37
5.2.150.0070.03216.37
5.2.140.0090.02716.37
5.2.130.0000.04316.37
5.2.120.0030.03716.37
5.2.110.0030.03016.37
5.2.100.0040.02916.37
5.2.90.0070.03316.37
5.2.80.0000.04116.37
5.2.70.0000.03616.37
5.2.60.0200.03416.37
5.2.50.0060.03316.37
5.2.40.0000.03416.37
5.2.30.0120.02316.37
5.2.20.0040.03316.37
5.2.10.0030.03116.37
5.2.00.0040.03316.37
5.1.60.0040.02516.37
5.1.50.0000.02916.37
5.1.40.0070.02516.37
5.1.30.0000.03216.37
5.1.20.0030.03116.37
5.1.10.0060.02316.37
5.1.00.0270.02416.37
5.0.50.0000.02316.37
5.0.40.0100.01616.37
5.0.30.0090.03016.37
5.0.20.0000.02716.37
5.0.10.0000.03116.37
5.0.00.0030.03016.37
4.4.90.0080.01416.37
4.4.80.0030.01516.37
4.4.70.0000.01816.37
4.4.60.0060.01216.37
4.4.50.0060.01616.37
4.4.40.0070.02316.37
4.4.30.0000.01716.37
4.4.20.0030.01616.37
4.4.10.0000.01716.37
4.4.00.0030.02816.37
4.3.110.0030.01916.37
4.3.100.0060.01516.37
4.3.90.0030.01616.37
4.3.80.0030.02416.37
4.3.70.0000.02716.37
4.3.60.0000.01716.37
4.3.50.0070.01016.37
4.3.40.0030.02416.37
4.3.30.0060.01616.37
4.3.20.0080.01516.37
4.3.10.0000.01816.37
4.3.00.0000.01916.37

preferences:
52.41 ms | 401 KiB | 5 Q