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'); foreach ($oses as $os => $identificator) { if (is_array($identificator)) { user_error('is array', E_USER_NOTICE); foreach ($identificator as $ident) { 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.0100.00716.88
8.3.50.0120.00517.64
8.3.40.0080.01219.16
8.3.30.0070.01719.04
8.3.20.0030.00619.16
8.3.10.0040.00419.16
8.3.00.0030.00619.63
8.2.180.0150.00016.75
8.2.170.0070.00722.96
8.2.160.0130.00319.26
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0050.00226.16
8.2.120.0060.00321.18
8.2.110.0100.00021.22
8.2.100.0080.00417.97
8.2.90.0060.00621.20
8.2.80.0040.00419.28
8.2.70.0040.00417.63
8.2.60.0030.00618.04
8.2.50.0000.00818.07
8.2.40.0080.00017.92
8.2.30.0040.00418.10
8.2.20.0040.00417.86
8.2.10.0030.00517.89
8.2.00.0040.00418.03
8.1.280.0040.01225.92
8.1.270.0030.00523.99
8.1.260.0060.00326.35
8.1.250.0080.00028.09
8.1.240.0030.00920.82
8.1.230.0040.00820.96
8.1.220.0030.00617.76
8.1.210.0070.00318.98
8.1.200.0000.01017.48
8.1.190.0000.00917.66
8.1.180.0000.00818.10
8.1.170.0060.00318.96
8.1.160.0030.00519.06
8.1.150.0060.00318.83
8.1.140.0040.00417.55
8.1.130.0070.00017.79
8.1.120.0040.00417.68
8.1.110.0030.00517.54
8.1.100.0030.00617.59
8.1.90.0040.00417.66
8.1.80.0040.00417.60
8.1.70.0000.00817.64
8.1.60.0000.00817.67
8.1.50.0000.00817.57
8.1.40.0060.00317.64
8.1.30.0030.00617.66
8.1.20.0040.00417.88
8.1.10.0000.00817.66
8.1.00.0050.00317.64
8.0.300.0040.00419.95
8.0.290.0040.00417.00
8.0.280.0070.00018.51
8.0.270.0040.00417.36
8.0.260.0080.00018.54
8.0.250.0050.00217.17
8.0.240.0000.00717.23
8.0.230.0040.00417.13
8.0.220.0040.00417.06
8.0.210.0000.00717.17
8.0.200.0080.00017.18
8.0.190.0060.00317.18
8.0.180.0000.00817.18
8.0.170.0060.00317.05
8.0.160.0050.00317.00
8.0.150.0060.00317.14
8.0.140.0000.01017.01
8.0.130.0000.00613.53
8.0.120.0030.00617.06
8.0.110.0040.00417.14
8.0.100.0000.00816.95
8.0.90.0040.00417.00
8.0.80.0070.01717.12
8.0.70.0000.00817.26
8.0.60.0000.00816.91
8.0.50.0050.00317.17
8.0.30.0140.00717.33
8.0.20.0140.00517.40
8.0.10.0050.00317.11
8.0.00.0070.01317.10
7.4.330.0030.00213.24
7.4.320.0000.00916.72
7.4.300.0040.00416.86
7.4.290.0000.00716.74
7.4.280.0080.00016.85
7.4.270.0000.00716.85
7.4.260.0030.00313.52
7.4.250.0040.00416.65
7.4.240.0040.00416.82
7.4.230.0030.00316.84
7.4.220.0130.00616.75
7.4.210.0100.01316.80
7.4.200.0040.00416.64
7.4.190.0000.00916.84
7.4.160.0140.01016.76
7.4.150.0170.00716.60
7.4.140.0070.01116.77
7.4.130.0100.00716.64
7.4.120.0110.00916.63
7.4.110.0070.01116.75
7.4.100.0060.01116.71
7.4.90.0080.01116.71
7.4.80.0100.00719.39
7.4.70.0060.01516.70
7.4.60.0030.01516.82
7.4.50.0020.00216.80
7.4.40.0090.00916.79
7.4.30.0120.00616.84
7.4.00.0140.00315.18
7.3.330.0000.00713.40
7.3.320.0040.00413.37
7.3.310.0040.00416.66
7.3.300.0000.00716.48
7.3.290.0080.00716.55
7.3.280.0100.00816.55
7.3.270.0090.00916.64
7.3.260.0100.01316.66
7.3.250.0130.00716.63
7.3.240.0060.01216.65
7.3.230.0090.00916.67
7.3.210.0110.00716.66
7.3.200.0140.01016.81
7.3.190.0100.00716.52
7.3.180.0070.01416.79
7.3.170.0150.00316.84
7.3.160.0090.00916.75
7.3.120.0040.01515.24
7.3.10.0040.01216.97
7.3.00.0070.01016.86
7.2.330.0060.01417.08
7.2.320.0070.01116.88
7.2.310.0060.01316.84
7.2.300.0150.00316.91
7.2.290.0060.01316.83
7.2.130.0030.00917.22
7.2.120.0060.00917.15
7.2.110.0090.00617.09
7.2.100.0070.00717.29
7.2.90.0100.00716.98
7.2.80.0120.00017.02
7.2.70.0000.01617.23
7.2.60.0070.00717.20
7.2.50.0050.00517.27
7.2.40.0070.00717.05
7.2.30.0100.00717.20
7.2.20.0070.00717.29
7.2.10.0070.01017.20
7.2.00.0060.00818.33
7.1.250.0070.01016.17
7.1.100.0070.00718.22
7.1.70.0030.00517.52
7.1.60.0140.01019.30
7.1.50.0160.00617.28
7.1.00.0070.06022.38
7.0.200.0130.00316.96
7.0.140.0030.07722.11
7.0.120.0070.07022.07
7.0.60.0170.07020.12
7.0.50.0000.04317.89
7.0.40.0130.08020.09
7.0.30.0330.08020.18
7.0.20.0270.08020.23
7.0.10.0070.06020.21
7.0.00.0070.08320.09
5.6.280.0000.07721.04
5.6.210.0030.04020.75
5.6.200.0130.07718.16
5.6.190.0070.05720.40
5.6.180.3170.04020.40
5.6.170.0230.04320.45
5.6.160.0170.06720.46
5.6.150.0030.04318.21
5.6.140.0100.07318.23
5.6.130.0100.04318.21
5.6.120.0130.03721.12
5.6.110.0100.07721.00
5.6.100.0070.07321.05
5.6.90.0100.07021.20
5.6.80.0030.08320.49
5.6.70.2400.04320.39
5.5.350.4200.04320.45
5.5.340.0070.06018.05
5.5.330.0070.04020.07
5.5.320.3430.03320.28
5.5.310.0130.04720.30
5.5.300.0070.08017.94
5.5.290.0030.04318.05
5.5.280.0030.08720.90
5.5.270.0070.08720.91
5.5.260.0070.08720.70
5.5.250.0130.05720.60
5.5.240.0300.06320.14
5.4.450.0100.03319.13
5.4.440.0030.04019.48
5.4.430.0030.07719.41
5.4.420.0000.04319.11
5.4.410.0130.06719.38
5.4.400.0030.07718.80
5.4.390.0030.08319.12
5.4.380.0070.04318.79
5.4.370.0170.03319.14
5.4.360.0070.03719.18
5.4.350.0130.07018.95
5.4.340.0130.06019.18
5.4.320.0030.04019.09
5.4.310.0070.06319.09
5.4.300.0070.04718.91
5.4.290.0100.04719.12
5.4.280.0070.06719.09
5.4.270.0000.04319.18
5.4.260.0070.07019.18
5.4.250.0070.05018.81
5.4.240.0100.08018.91
5.4.230.0170.07019.08
5.4.220.0030.04019.14
5.4.210.0100.03019.12
5.4.200.0100.07019.16
5.4.190.0170.06318.92
5.4.180.0100.06019.11
5.4.170.0030.05019.11
5.4.160.0130.07018.99
5.4.150.0070.03718.77
5.4.140.0000.05316.48
5.4.130.0030.04016.26
5.4.120.0070.06716.22
5.4.110.0030.08016.30
5.4.100.0070.07016.34
5.4.90.0100.05016.36
5.4.80.0070.06716.31
5.4.70.0100.07016.40
5.4.60.0100.06716.31
5.4.50.0070.05716.38
5.4.40.0000.07316.35
5.4.30.0100.04316.38
5.4.20.0070.06016.44
5.4.10.0070.05016.26
5.4.00.0000.04315.67
5.3.290.0030.07314.62
5.3.280.0130.07014.60
5.3.270.0030.07314.59
5.3.260.0100.07314.55
5.3.250.0130.05314.59
5.3.240.0070.07314.61
5.3.230.0100.06314.57
5.3.220.0000.08314.57
5.3.210.0100.07714.52
5.3.200.0100.08714.48
5.3.190.0100.06014.42
5.3.180.0000.06314.53
5.3.170.0030.07714.52
5.3.160.0000.08014.52
5.3.150.0070.07714.53
5.3.140.0030.06314.39
5.3.130.0030.08014.51
5.3.120.0030.08314.52
5.3.110.0130.04714.66
5.3.100.0030.05713.86
5.3.90.0000.04713.84
5.3.80.0170.02713.98
5.3.70.0100.06313.98
5.3.60.0130.04313.97
5.3.50.0000.04314.07
5.3.40.0100.05013.77
5.3.30.0030.06013.95
5.3.20.0000.07713.69
5.3.10.0200.05713.63
5.3.00.0170.04313.63
5.2.170.0130.05311.34
5.2.160.0130.05311.19
5.2.150.0070.06011.14
5.2.140.0100.03711.20
5.2.130.0000.06711.10
5.2.120.0070.05711.14
5.2.110.0030.05311.11
5.2.100.0070.06311.07
5.2.90.0100.04710.99
5.2.80.0100.05711.05
5.2.70.0070.06011.02
5.2.60.0000.07011.05
5.2.50.0100.05010.93
5.2.40.0130.05711.02
5.2.30.0030.06310.99
5.2.20.0000.07010.93
5.2.10.0030.06310.88
5.2.00.0130.05010.70
5.1.60.0000.0579.87
5.1.50.0030.03010.18
5.1.40.0070.05310.16
5.1.30.0070.04310.41
5.1.20.0030.05710.29
5.1.10.0030.04010.07
5.1.00.0030.03010.01
5.0.50.0000.0379.18
5.0.40.0000.0539.18
5.0.30.0000.0579.18
5.0.20.0000.0309.18
5.0.10.0000.0309.18
5.0.00.0000.0579.18
4.4.90.0000.0379.18
4.4.80.0030.0339.18
4.4.70.0000.0309.18
4.4.60.0030.0379.18
4.4.50.0100.0309.18
4.4.40.0000.0339.18
4.4.30.0070.0239.18
4.4.20.0000.0409.18
4.4.10.0070.0239.18
4.4.00.0070.0339.18
4.3.110.0000.0339.18
4.3.100.0030.0379.18
4.3.90.0000.0279.18
4.3.80.0030.0409.18
4.3.70.0030.0379.18
4.3.60.0000.0339.18
4.3.50.0000.0239.18
4.3.40.0000.0539.18
4.3.30.0100.0139.18
4.3.20.0000.0379.18
4.3.10.0000.0309.18
4.3.00.0030.0309.18

preferences:
39.4 ms | 401 KiB | 5 Q