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)) { $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.0090.01318.75
8.3.50.0070.01422.17
8.3.40.0030.01218.99
8.3.30.0100.01318.96
8.3.20.0100.01019.13
8.3.10.0100.01020.63
8.3.00.0050.00323.66
8.2.180.0040.01118.68
8.2.170.0110.00722.96
8.2.160.0040.01120.39
8.2.150.0080.00024.18
8.2.140.0070.01124.66
8.2.130.0110.00726.16
8.2.120.0070.00417.75
8.2.110.0140.00320.57
8.2.100.0120.00017.97
8.2.90.0030.00619.19
8.2.80.0030.00517.97
8.2.70.0060.00317.88
8.2.60.0030.00717.93
8.2.50.0090.00018.07
8.2.40.0040.00418.22
8.2.30.0040.00419.86
8.2.20.0030.00518.01
8.2.10.0030.00517.86
8.2.00.0080.00018.00
8.1.280.0160.00025.92
8.1.270.0070.01123.99
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0090.00022.18
8.1.230.0040.00817.71
8.1.220.0050.00317.79
8.1.210.0080.00018.77
8.1.200.0040.00417.48
8.1.190.0000.00917.63
8.1.180.0030.00618.10
8.1.170.0000.00818.59
8.1.160.0040.00419.05
8.1.150.0030.00518.81
8.1.140.0030.00517.56
8.1.130.0040.00417.75
8.1.120.0050.00317.72
8.1.110.0000.00817.59
8.1.100.0040.00417.64
8.1.90.0040.00417.65
8.1.80.0040.00417.52
8.1.70.0000.00717.55
8.1.60.0030.00517.66
8.1.50.0040.00417.66
8.1.40.0040.00417.70
8.1.30.0000.00917.77
8.1.20.0000.01017.73
8.1.10.0030.00517.82
8.1.00.0030.00517.57
8.0.300.0050.00318.77
8.0.290.0000.00817.00
8.0.280.0030.00318.50
8.0.270.0000.00717.36
8.0.260.0040.00417.16
8.0.250.0040.00417.15
8.0.240.0110.00017.09
8.0.230.0000.00717.27
8.0.220.0000.00817.02
8.0.210.0000.00717.19
8.0.200.0000.00817.17
8.0.190.0000.00817.05
8.0.180.0040.00417.20
8.0.170.0000.00717.05
8.0.160.0080.00017.11
8.0.150.0060.00317.02
8.0.140.0070.00017.00
8.0.130.0060.00313.45
8.0.120.0030.00616.95
8.0.110.0050.00317.04
8.0.100.0080.00017.19
8.0.90.0000.00817.00
8.0.80.0110.00717.16
8.0.70.0040.00417.13
8.0.60.0030.00516.98
8.0.50.0080.00016.99
8.0.30.0060.01317.48
8.0.20.0120.00717.44
8.0.10.0030.00517.14
8.0.00.0080.00817.04
7.4.330.0000.00515.07
7.4.320.0030.00316.86
7.4.300.0030.00316.74
7.4.290.0040.00416.76
7.4.280.0000.00816.63
7.4.270.0040.00416.75
7.4.260.0030.00313.48
7.4.250.0040.00416.62
7.4.240.0040.00416.73
7.4.230.0000.00716.57
7.4.220.0140.00416.83
7.4.210.0100.00916.80
7.4.200.0000.00716.73
7.4.190.0000.00816.91
7.4.160.0130.00316.96
7.4.150.0060.01217.40
7.4.140.0130.01117.86
7.4.130.0120.00616.86
7.4.120.0090.01016.88
7.4.110.0120.00616.67
7.4.100.0060.01216.62
7.4.90.0120.00616.76
7.4.80.0100.01416.70
7.4.70.0000.01816.68
7.4.60.0060.01116.73
7.4.50.0040.00416.73
7.4.40.0030.01222.27
7.4.30.0150.00916.79
7.4.00.0070.01015.09
7.3.330.0030.00313.40
7.3.320.0000.00613.38
7.3.310.0080.00016.50
7.3.300.0000.00716.59
7.3.290.0120.00316.54
7.3.280.0120.00716.55
7.3.270.0070.01117.40
7.3.260.0110.00718.24
7.3.250.0100.01316.69
7.3.240.0090.00916.52
7.3.230.0090.00916.58
7.3.210.0110.00716.48
7.3.200.0120.00619.39
7.3.190.0070.01016.67
7.3.180.0030.01416.94
7.3.170.0130.00716.57
7.3.160.0090.01416.61
7.3.120.0090.00615.09
7.3.10.0060.00616.94
7.3.00.0030.01016.93
7.2.330.0040.01416.85
7.2.320.0130.00316.78
7.2.310.0070.01316.89
7.2.300.0030.01416.91
7.2.290.0070.01116.89
7.2.130.0000.01417.16
7.2.120.0110.00417.15
7.2.110.0060.01017.14
7.2.100.0110.00317.15
7.2.90.0040.00817.27
7.2.80.0000.01416.96
7.2.70.0120.00617.01
7.2.60.0000.01417.29
7.2.50.0110.00017.22
7.2.40.0030.00617.28
7.2.30.0040.00817.12
7.2.20.0100.00717.21
7.2.10.0030.00817.25
7.2.00.0040.01018.51
7.1.250.0040.00715.97
7.1.100.0040.00418.59
7.1.70.0000.00817.45
7.1.60.0060.01919.40
7.1.50.0060.00617.33
7.1.00.0100.05022.48
7.0.200.0500.00314.92
7.0.140.0000.08022.05
7.0.70.0000.08021.68
7.0.60.0030.04321.80
7.0.50.0070.03722.03
7.0.40.0000.04320.08
7.0.30.0100.03720.16
7.0.20.0030.06320.09
7.0.10.0100.06719.96
7.0.00.0000.04320.13
5.6.280.0030.07720.95
5.6.220.0000.04720.51
5.6.210.0030.04020.79
5.6.200.0030.04021.05
5.6.190.0030.08321.05
5.6.180.0070.08321.06
5.6.170.0030.05721.11
5.6.160.0070.03721.05
5.6.150.0070.03720.96
5.6.140.0070.07321.12
5.6.130.0000.04720.94
5.6.120.0030.03321.10
5.6.110.0070.03021.10
5.6.100.0070.03721.04
5.6.90.0000.04320.95
5.6.80.0030.03720.46
5.6.70.0030.05320.44
5.6.60.0030.07320.49
5.6.50.0000.07020.48
5.6.40.0100.05320.41
5.6.30.0130.07720.50
5.6.20.0030.08020.46
5.6.10.0100.07320.31
5.6.00.0030.08020.47
5.5.360.0030.04320.57
5.5.350.0070.04020.50
5.5.340.0070.03720.95
5.5.330.0200.04320.79
5.5.320.0070.03720.79
5.5.310.0100.06320.79
5.5.300.0030.04020.88
5.5.290.0000.04320.91
5.5.280.0030.04020.92
5.5.270.0070.03720.94
5.5.260.0030.03320.88
5.5.250.0030.07720.57
5.5.240.0000.03320.22
5.5.230.0030.08320.14
5.5.220.0030.04720.17
5.5.210.0130.07320.30
5.5.200.0000.08720.15
5.5.190.0030.08020.01
5.5.180.0030.07020.21
5.5.160.0030.08320.13
5.5.150.0030.05320.26
5.5.140.0100.07720.28
5.5.130.0070.05020.26
5.5.120.0000.05320.21
5.5.110.0030.05020.19
5.5.100.0030.08020.19
5.5.90.0030.08019.97
5.5.80.0000.05019.97
5.5.70.0000.05320.06
5.5.60.0070.07320.02
5.5.50.0030.08320.12
5.5.40.0070.07720.02
5.5.30.0070.08020.09
5.5.20.0000.08320.10
5.5.10.0100.07020.13
5.5.00.0100.06020.09
5.4.450.0000.04019.36
5.4.440.0070.03319.40
5.4.430.0000.03719.41
5.4.420.0000.04019.41
5.4.410.0030.04319.31
5.4.400.0000.03719.24
5.4.390.0030.05319.14
5.4.380.0100.07019.02
5.4.370.0070.07719.12
5.4.360.0070.06319.03
5.4.350.0100.07719.04
5.4.340.0070.07319.07
5.4.320.0000.08319.06
5.4.310.0130.07019.09
5.4.300.0000.06718.81
5.4.290.0030.06318.90
5.4.280.0100.07019.09
5.4.270.0000.08318.96
5.4.260.0070.07319.12
5.4.250.0100.06718.96
5.4.240.0030.05719.11
5.4.230.0000.07719.02
5.4.220.0100.06318.78
5.4.210.0130.06018.93
5.4.200.0000.06019.02
5.4.190.0070.05019.11
5.4.180.0000.08319.09
5.4.170.0030.07318.88
5.4.160.0100.06718.96
5.4.150.0000.08318.96
5.4.140.0000.07316.30
5.4.130.0030.07716.31
5.4.120.0070.07016.27
5.4.110.0100.06716.36
5.4.100.0100.06716.28
5.4.90.0070.07716.40
5.4.80.0030.04316.31
5.4.70.0030.05016.29
5.4.60.0070.07016.40
5.4.50.0000.07316.21
5.4.40.0070.07316.36
5.4.30.0030.07016.31
5.4.20.0030.07016.23
5.4.10.0000.07716.20
5.4.00.0030.07315.81
5.3.290.0030.07714.59
5.3.280.0100.05714.57
5.3.270.0030.06714.59
5.3.260.0000.05714.58
5.3.250.0030.07314.61
5.3.240.0070.07014.49
5.3.230.0030.07314.58
5.3.220.0100.06714.41
5.3.210.0030.08014.41
5.3.200.0000.08014.45
5.3.190.0000.07714.55
5.3.180.0030.07014.40
5.3.170.0030.07314.54
5.3.160.0030.07714.42
5.3.150.0070.07314.49
5.3.140.0030.06714.57
5.3.130.0000.08314.42
5.3.120.0100.06714.56
5.3.110.0030.07714.57
5.3.100.0000.07313.88
5.3.90.0000.07314.05
5.3.80.0000.07314.03
5.3.70.0070.07713.81
5.3.60.0030.07013.96
5.3.50.0030.06713.82
5.3.40.0030.07313.93
5.3.30.0000.08013.87
5.3.20.0070.06013.47
5.3.10.0000.06013.45
5.3.00.0030.04713.65
5.2.170.0070.04011.48
5.2.160.0030.06311.48
5.2.150.0070.05011.48
5.2.140.0030.05711.48
5.2.130.0070.05011.48
5.2.120.0070.05711.48
5.2.110.0000.06311.48
5.2.100.0030.06311.48
5.2.90.0030.06011.48
5.2.80.0000.06711.48
5.2.70.0100.04711.48
5.2.60.0030.06311.48
5.2.50.0000.06011.48
5.2.40.0030.05711.48
5.2.30.0030.06311.48
5.2.20.0030.04011.48
5.2.10.0000.06711.48
5.2.00.0030.05011.48
5.1.60.0030.05311.48
5.1.50.0030.03711.48
5.1.40.0070.05011.48
5.1.30.0070.05311.48
5.1.20.0030.03711.48
5.1.10.0070.05311.48
5.1.00.0030.05711.48
5.0.50.0030.04311.48
5.0.40.0030.04711.48
5.0.30.0000.07011.48
5.0.20.0030.04311.48
5.0.10.0030.04311.48
5.0.00.0000.04311.48
4.4.90.0030.03311.48
4.4.80.0070.03011.48
4.4.70.0030.03711.48
4.4.60.0000.03711.48
4.4.50.0030.03311.48
4.4.40.0000.04711.48
4.4.30.0000.02011.48
4.4.20.0030.03711.48
4.4.10.0030.03011.48
4.4.00.0030.05011.48
4.3.110.0000.03711.48
4.3.100.0000.03311.48
4.3.90.0070.02711.48
4.3.80.0070.05311.48
4.3.70.0030.01711.48
4.3.60.0030.01711.48
4.3.50.0000.03711.48
4.3.40.0000.05311.48
4.3.30.0000.03711.48
4.3.20.0030.03311.48
4.3.10.0000.04011.48
4.3.00.0000.03711.48

preferences:
41.67 ms | 401 KiB | 5 Q