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; continue; } } } # 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.0130.00918.81
8.3.50.0120.00822.20
8.3.40.0040.01819.23
8.3.30.0030.01219.18
8.3.20.0040.00420.19
8.3.10.0030.00522.04
8.3.00.0000.00822.34
8.2.180.0150.00716.88
8.2.170.0110.01122.96
8.2.160.0120.00321.11
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0080.00026.16
8.2.120.0000.00819.86
8.2.110.0100.00021.13
8.2.100.0110.00018.10
8.2.90.0040.00419.22
8.2.80.0080.00017.97
8.2.70.0090.00017.88
8.2.60.0000.00818.05
8.2.50.0040.00418.10
8.2.40.0030.00918.34
8.2.30.0030.00618.25
8.2.20.0000.00817.84
8.2.10.0030.00617.96
8.2.00.0000.00818.04
8.1.280.0120.00925.92
8.1.270.0080.00023.85
8.1.260.0090.00026.35
8.1.250.0170.00328.09
8.1.240.0090.00023.87
8.1.230.0090.00317.70
8.1.220.0030.00517.79
8.1.210.0090.00018.77
8.1.200.0070.00317.48
8.1.190.0000.00817.47
8.1.180.0080.00018.10
8.1.170.0080.00418.72
8.1.160.0000.00822.13
8.1.150.0040.00420.57
8.1.140.0060.00317.54
8.1.130.0040.00417.87
8.1.120.0040.00417.65
8.1.110.0080.00017.61
8.1.100.0030.00517.59
8.1.90.0000.00817.60
8.1.80.0030.00517.62
8.1.70.0000.00717.52
8.1.60.0080.00017.68
8.1.50.0060.00317.70
8.1.40.0110.00017.71
8.1.30.0000.00817.76
8.1.20.0060.00317.79
8.1.10.0040.00417.72
8.1.00.0030.00617.68
8.0.300.0060.00318.77
8.0.290.0040.00417.00
8.0.280.0000.00718.52
8.0.270.0000.00717.21
8.0.260.0040.00417.04
8.0.250.0000.00717.19
8.0.240.0040.00417.07
8.0.230.0040.00417.14
8.0.220.0080.00017.03
8.0.210.0040.00417.03
8.0.200.0030.00317.20
8.0.190.0000.00817.06
8.0.180.0030.00617.10
8.0.170.0030.00517.19
8.0.160.0000.00817.00
8.0.150.0000.00717.06
8.0.140.0000.00817.05
8.0.130.0000.00613.52
8.0.120.0040.00417.03
8.0.110.0040.00417.19
8.0.100.0040.00416.95
8.0.90.0040.00416.99
8.0.80.0150.00617.10
8.0.70.0080.00017.09
8.0.60.0000.00817.07
8.0.50.0040.00417.14
8.0.30.0080.01517.52
8.0.20.0110.01117.40
8.0.10.0050.00317.11
8.0.00.0080.01116.98
7.4.330.0000.00515.01
7.4.320.0030.00316.83
7.4.300.0070.00016.88
7.4.290.0000.00716.82
7.4.280.0040.00416.73
7.4.270.0070.00016.82
7.4.260.0030.00416.59
7.4.250.0050.00316.75
7.4.240.0050.00316.74
7.4.230.0000.00716.75
7.4.220.0070.01916.74
7.4.210.0050.01216.81
7.4.200.0040.00416.63
7.4.190.0070.00016.98
7.4.160.0040.01216.55
7.4.150.0060.01817.40
7.4.140.0060.01217.86
7.4.130.0090.01516.83
7.4.120.0070.01116.73
7.4.110.0150.00916.90
7.4.100.0070.01016.71
7.4.90.0070.01016.54
7.4.80.0100.01019.39
7.4.70.0110.00616.78
7.4.60.0130.00616.54
7.4.50.0000.00416.57
7.4.40.0000.01922.77
7.4.30.0100.00716.79
7.4.00.0050.00814.93
7.3.330.0030.00313.48
7.3.320.0030.00313.30
7.3.310.0000.00716.50
7.3.300.0030.00316.55
7.3.290.0160.00016.62
7.3.280.0100.00816.54
7.3.270.0120.00617.40
7.3.260.0160.00316.77
7.3.250.0130.00816.79
7.3.240.0080.01116.53
7.3.230.0140.00316.78
7.3.210.0100.00716.86
7.3.200.0100.01319.39
7.3.190.0130.00316.85
7.3.180.0060.01216.87
7.3.170.0050.01116.89
7.3.160.0090.00816.80
7.3.120.0030.01015.27
7.3.10.0130.00316.92
7.3.00.0090.00617.04
7.2.330.0070.01116.68
7.2.320.0170.00516.81
7.2.310.0130.01016.68
7.2.300.0140.00316.74
7.2.290.0090.00916.66
7.2.130.0070.01117.09
7.2.120.0070.01017.08
7.2.110.0040.01417.14
7.2.100.0070.00317.16
7.2.90.0060.00817.29
7.2.80.0040.00716.91
7.2.70.0000.00917.11
7.2.60.0030.00917.29
7.2.50.0000.01617.18
7.2.40.0060.00317.24
7.2.30.0080.00417.18
7.2.20.0070.00717.07
7.2.10.0050.00317.23
7.2.00.0030.01118.29
7.1.250.0100.00716.25
7.1.100.0090.00318.28
7.1.70.0070.01017.33
7.1.60.0170.00719.82
7.1.50.0000.02116.92
7.1.00.0100.08322.33
7.0.200.0080.00416.99
7.0.140.0000.07721.95
7.0.100.0030.04319.92
7.0.90.0170.03020.00
7.0.80.0070.04719.89
7.0.70.0070.03319.89
7.0.60.0130.04020.11
7.0.50.0100.03720.31
7.0.40.0030.03320.10
7.0.30.0030.04020.14
7.0.20.0030.03720.09
7.0.10.0000.03720.15
7.0.00.0070.03320.19
5.6.280.0100.06721.07
5.6.250.0070.04020.66
5.6.240.0170.03020.71
5.6.230.0030.03720.52
5.6.220.0030.04020.70
5.6.210.0000.04320.58
5.6.200.0070.04021.06
5.6.190.0000.05320.91
5.6.180.0100.03321.07
5.6.170.0000.04021.04
5.6.160.0000.03721.07
5.6.150.0030.03720.96
5.6.140.0070.03321.07
5.6.130.0070.03321.19
5.6.120.0030.03720.96
5.6.110.0030.03721.02
5.6.100.0030.03721.02
5.6.90.0070.03321.05
5.6.80.0000.04020.43
5.6.70.0030.03320.44
5.6.60.0130.05320.32
5.6.50.0000.08020.57
5.6.40.0100.07720.46
5.6.30.0000.08020.40
5.6.20.0100.07720.39
5.6.10.0070.06020.38
5.6.00.0030.07720.37
5.5.380.0070.04020.57
5.5.370.0100.03020.42
5.5.360.0000.04020.41
5.5.350.0170.03720.47
5.5.340.0070.04020.95
5.5.330.0100.03020.91
5.5.320.0030.04320.91
5.5.310.0070.03320.92
5.5.300.0070.03320.93
5.5.290.0030.03320.81
5.5.280.0000.04020.79
5.5.270.0070.03720.93
5.5.260.0030.04020.79
5.5.250.0030.03320.75
5.5.240.0030.03320.18
5.5.230.0030.05020.04
5.5.220.0100.07320.13
5.5.210.0030.04020.30
5.5.200.0070.04020.23
5.5.190.0130.06020.28
5.5.180.0070.07720.11
5.5.160.0030.08020.17
5.5.150.0170.06320.25
5.5.140.0030.07020.14
5.5.130.0000.05320.02
5.5.120.0070.03320.13
5.5.110.0030.03720.25
5.5.100.0100.06720.13
5.5.90.0130.07020.12
5.5.80.0000.03720.18
5.5.70.0130.07020.07
5.5.60.0100.07019.98
5.5.50.0200.06320.17
5.5.40.0030.05719.95
5.5.30.0130.05020.07
5.5.20.0000.08320.07
5.5.10.0030.05720.14
5.5.00.0130.06720.06
5.4.450.0000.04019.45
5.4.440.0000.03719.23
5.4.430.0030.03319.42
5.4.420.0000.04019.37
5.4.410.0130.02319.34
5.4.400.0070.03019.14
5.4.390.0030.03319.14
5.4.380.0200.05719.14
5.4.370.0000.07718.81
5.4.360.0030.03319.07
5.4.350.0070.07019.10
5.4.340.0100.07319.03
5.4.320.0000.08019.03
5.4.310.0000.03718.78
5.4.300.0000.04719.07
5.4.290.0170.07319.12
5.4.280.0070.03318.80
5.4.270.0030.07718.97
5.4.260.0030.08318.80
5.4.250.0100.07319.09
5.4.240.0100.06319.04
5.4.230.0100.05018.80
5.4.220.0070.07019.11
5.4.210.0000.08719.11
5.4.200.0030.04719.11
5.4.190.0100.07719.02
5.4.180.0030.04018.80
5.4.170.0030.04719.04
5.4.160.0130.05719.16
5.4.150.0070.05318.79
5.4.140.0000.04316.28
5.4.130.0100.06716.27
5.4.120.0130.06016.37
5.4.110.0130.06316.23
5.4.100.0100.05716.29
5.4.90.0230.03716.30
5.4.80.0100.06716.26
5.4.70.0100.04716.34
5.4.60.0030.04716.36
5.4.50.0030.08016.40
5.4.40.0030.05316.35
5.4.30.0030.07716.20
5.4.20.0030.05016.39
5.4.10.0000.06716.21
5.4.00.0030.07015.71
5.3.290.0030.06014.66
5.3.280.0070.09314.55
5.3.270.0070.08014.56
5.3.260.0100.06314.49
5.3.250.0030.04714.62
5.3.240.0000.04314.62
5.3.230.0070.07014.45
5.3.220.0130.03314.57
5.3.210.0030.04014.45
5.3.200.0070.03314.53
5.3.190.0070.03714.57
5.3.180.0200.06714.57
5.3.170.0000.07314.44
5.3.160.0000.05714.54
5.3.150.0070.05314.53
5.3.140.0000.04314.51
5.3.130.0100.07314.43
5.3.120.0070.07714.43
5.3.110.0070.07314.58
5.3.100.0130.06713.91
5.3.90.0030.04013.87
5.3.80.0070.03713.89
5.3.70.0130.02713.89
5.3.60.0100.04313.88
5.3.50.0030.03013.72
5.3.40.0000.04013.73
5.3.30.0000.03313.92
5.3.20.0000.04013.70
5.3.10.0100.07013.62
5.3.00.0030.03013.65
5.2.170.0030.03011.02
5.2.160.0070.02011.13
5.2.150.0030.04711.19
5.2.140.0030.03311.21
5.2.130.0030.02711.12
5.2.120.0100.05011.00
5.2.110.0030.02711.04
5.2.100.0030.02310.95
5.2.90.0070.06010.94
5.2.80.0100.03310.94
5.2.70.0070.02011.08
5.2.60.0000.03010.92
5.2.50.0000.03010.99
5.2.40.0000.02710.97
5.2.30.0070.02010.84
5.2.20.0030.02710.97
5.2.10.0000.06010.88
5.2.00.0070.02710.64
5.1.60.0000.05310.07
5.1.50.0030.05710.01
5.1.40.0000.03310.04
5.1.30.0000.05710.29
5.1.20.0130.02310.45
5.1.10.0000.02710.14
5.1.00.0030.04710.14
5.0.50.0070.0479.57
5.0.40.0000.0279.57
5.0.30.0130.0579.57
5.0.20.0030.0409.57
5.0.10.0030.0479.57
5.0.00.0030.0479.57
4.4.90.0030.0279.57
4.4.80.0000.0379.57
4.4.70.0000.0279.57
4.4.60.0000.0379.57
4.4.50.0000.0379.57
4.4.40.0000.0339.57
4.4.30.0000.0239.57
4.4.20.0000.0239.57
4.4.10.0000.0279.57
4.4.00.0030.0379.57
4.3.110.0070.0109.57
4.3.100.0000.0209.57
4.3.90.0000.0179.57
4.3.80.0030.0239.57
4.3.70.0030.0339.57
4.3.60.0070.0309.57
4.3.50.0030.0139.57
4.3.40.0030.0509.57
4.3.30.0030.0379.57
4.3.20.0030.0339.57
4.3.10.0000.0239.57
4.3.00.0000.0279.57

preferences:
57.78 ms | 401 KiB | 5 Q