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($identificator, 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.0170.00018.55
8.3.50.0070.01121.21
8.3.40.0120.00319.04
8.3.30.0120.00319.13
8.3.20.0040.00419.02
8.3.10.0000.00920.91
8.3.00.0040.00423.61
8.2.180.0160.00616.88
8.2.170.0060.01022.96
8.2.160.0070.00720.39
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0030.00526.16
8.2.120.0080.00019.73
8.2.110.0100.00022.43
8.2.100.0060.00618.03
8.2.90.0000.00819.17
8.2.80.0030.00618.05
8.2.70.0060.00317.75
8.2.60.0040.00417.92
8.2.50.0030.00618.07
8.2.40.0030.00618.28
8.2.30.0030.00619.99
8.2.20.0030.00517.78
8.2.10.0030.00518.04
8.2.00.0040.00417.88
8.1.280.0070.01425.92
8.1.270.0040.00423.99
8.1.260.0110.00426.35
8.1.250.0030.00528.09
8.1.240.0060.00620.72
8.1.230.0060.00620.96
8.1.220.0040.00418.77
8.1.210.0040.00818.97
8.1.200.0060.00317.61
8.1.190.0050.00317.65
8.1.180.0040.00418.10
8.1.170.0040.00418.84
8.1.160.0040.00418.95
8.1.150.0040.00418.83
8.1.140.0000.00817.54
8.1.130.0000.00717.93
8.1.120.0070.00017.67
8.1.110.0040.00417.54
8.1.100.0000.00817.50
8.1.90.0040.00417.56
8.1.80.0040.00417.59
8.1.70.0020.00517.65
8.1.60.0000.00817.77
8.1.50.0030.00617.65
8.1.40.0040.00417.65
8.1.30.0030.00617.85
8.1.20.0050.00317.67
8.1.10.0050.00517.72
8.1.00.0070.00417.58
8.0.300.0000.00819.86
8.0.290.0030.00617.30
8.0.280.0070.00018.39
8.0.270.0000.00817.36
8.0.260.0030.00317.05
8.0.250.0080.00017.19
8.0.240.0060.00317.19
8.0.230.0070.00017.16
8.0.220.0050.00317.01
8.0.210.0000.00817.16
8.0.200.0000.00717.09
8.0.190.0000.00817.08
8.0.180.0060.00317.06
8.0.170.0000.00717.12
8.0.160.0040.00417.03
8.0.150.0060.00317.14
8.0.140.0030.00717.14
8.0.130.0030.00313.49
8.0.120.0040.00417.08
8.0.110.0000.00917.00
8.0.100.0000.00817.00
8.0.90.0040.00417.00
8.0.80.0070.01417.13
8.0.70.0000.00817.18
8.0.60.0080.00016.94
8.0.50.0000.00817.19
8.0.30.0090.01117.43
8.0.20.0090.01417.40
8.0.10.0030.00517.14
8.0.00.0090.00917.07
7.4.330.0000.00514.96
7.4.320.0050.00216.84
7.4.300.0000.00716.86
7.4.290.0030.00316.81
7.4.280.0030.00516.75
7.4.270.0070.00016.77
7.4.260.0000.00513.50
7.4.250.0050.00316.77
7.4.240.0070.00016.72
7.4.230.0040.00416.82
7.4.220.0030.01416.76
7.4.210.0060.01116.83
7.4.200.0000.00716.75
7.4.190.0040.00416.93
7.4.160.0040.01216.85
7.4.150.0110.00817.40
7.4.140.0120.00717.86
7.4.130.0120.01616.83
7.4.120.0120.00616.72
7.4.110.0040.02116.88
7.4.100.0060.01616.78
7.4.90.0090.00916.68
7.4.80.0110.00819.04
7.4.70.0130.01016.75
7.4.60.0060.01316.75
7.4.50.0030.00616.56
7.4.40.0100.00422.27
7.4.30.0090.00917.00
7.4.10.0150.00916.82
7.4.00.0070.01215.85
7.3.330.0030.00313.46
7.3.320.0000.00613.45
7.3.310.0070.00016.56
7.3.300.0000.00716.56
7.3.290.0040.01216.54
7.3.280.0080.01016.56
7.3.270.0060.01317.40
7.3.260.0110.01118.24
7.3.250.0170.00516.51
7.3.240.0070.01816.64
7.3.230.0090.00916.73
7.3.210.0180.00416.76
7.3.200.0100.01319.39
7.3.190.0100.01316.75
7.3.180.0060.01316.55
7.3.170.0170.00616.74
7.3.160.0060.01216.59
7.3.130.0030.01716.63
7.3.120.0070.01215.60
7.3.110.0090.00915.69
7.3.100.0110.00515.71
7.3.90.0040.01415.93
7.3.80.0000.01415.69
7.3.70.0050.01115.79
7.3.60.0090.00615.79
7.3.50.0050.01415.79
7.3.40.0030.01215.64
7.3.30.0050.01015.76
7.3.20.0070.00617.74
7.3.10.0110.00617.54
7.3.00.0080.00717.55
7.2.330.0060.01316.66
7.2.320.0110.00816.86
7.2.310.0180.00816.99
7.2.300.0100.01316.72
7.2.290.0160.00316.89
7.2.260.0100.01016.64
7.2.250.0090.01316.16
7.2.240.0050.01215.90
7.2.230.0110.00916.03
7.2.220.0080.01016.07
7.2.210.0040.00916.11
7.2.200.0080.00716.04
7.2.190.0100.01015.93
7.2.180.0050.01016.12
7.2.170.0050.00916.11
7.2.160.0030.01416.79
7.2.150.0030.01318.48
7.2.140.0090.00918.73
7.2.130.0000.01518.58
7.2.120.0100.00318.58
7.2.110.0040.01418.60
7.2.100.0070.01118.71
7.2.90.0090.00918.64
7.2.80.0090.00918.61
7.2.70.0030.01318.63
7.2.60.0080.01218.61
7.2.50.0040.01518.77
7.2.40.0070.01118.41
7.2.30.0100.01018.61
7.2.20.0080.01118.58
7.2.10.0080.01118.46
7.2.00.0030.01219.14
7.1.330.0050.01116.69
7.1.320.0080.00816.89
7.1.310.0070.00516.76
7.1.300.0050.01216.74
7.1.290.0020.01216.63
7.1.280.0050.00916.82
7.1.270.0030.01016.77
7.1.260.0080.00716.78
7.1.250.0110.00417.57
7.1.240.0030.01017.51
7.1.230.0040.01117.60
7.1.220.0110.00717.65
7.1.210.0070.01017.47
7.1.200.0070.01017.57
7.1.190.0040.01017.54
7.1.180.0080.00717.55
7.1.170.0080.00817.63
7.1.160.0090.00617.63
7.1.150.0070.01017.62
7.1.140.0070.01017.57
7.1.130.0040.01217.55
7.1.120.0060.01217.57
7.1.110.0140.00317.56
7.1.100.0020.01218.07
7.1.90.0030.01317.50
7.1.80.0040.01117.48
7.1.70.0030.00817.29
7.1.60.0050.01618.50
7.1.50.0080.01017.15
7.1.40.0030.01017.41
7.1.30.0080.00817.48
7.1.20.0120.00317.56
7.1.10.0070.01017.49
7.1.00.0050.03719.81
7.0.330.0060.00616.90
7.0.320.0090.00617.19
7.0.310.0110.00817.11
7.0.300.0090.00617.00
7.0.290.0030.01217.27
7.0.280.0040.01117.07
7.0.270.0040.01317.11
7.0.260.0100.00717.24
7.0.250.0070.00717.29
7.0.240.0070.00717.32
7.0.230.0030.00617.29
7.0.220.0040.01517.40
7.0.210.0030.01117.13
7.0.200.0080.01315.89
7.0.190.0030.01017.18
7.0.180.0060.01317.33
7.0.170.0030.01017.12
7.0.160.0070.00717.19
7.0.150.0070.00417.21
7.0.140.0050.04019.59
7.0.130.0090.00317.19
7.0.120.0070.01117.12
7.0.110.0070.00917.15
7.0.100.0000.01317.01
7.0.90.0040.01217.32
7.0.80.0030.00617.00
7.0.70.0030.01317.18
7.0.60.0070.02018.53
7.0.50.0020.03017.45
7.0.40.2150.02917.72
7.0.30.1950.02517.63
7.0.20.0120.03717.67
7.0.10.0050.04517.63
7.0.00.1780.02717.63
5.6.400.0070.00715.88
5.6.390.0050.00816.08
5.6.380.0100.00716.11
5.6.370.0060.01016.16
5.6.360.0070.01015.86
5.6.350.0130.00315.94
5.6.340.0070.00415.78
5.6.330.0120.00916.11
5.6.320.0000.01416.16
5.6.310.0160.00516.12
5.6.300.0040.00715.81
5.6.290.0070.01016.17
5.6.280.0090.03718.64
5.6.270.0040.01216.01
5.6.260.0070.00716.05
5.6.250.0000.01515.87
5.6.240.0070.00715.88
5.6.230.0030.01415.89
5.6.220.0100.01315.86
5.6.210.0100.04518.35
5.6.200.0070.02317.17
5.6.190.1780.02118.32
5.6.180.1750.02018.21
5.6.170.2130.02318.17
5.6.160.2110.02618.43
5.6.150.2100.02718.23
5.6.140.1430.02618.11
5.6.130.1660.02318.18
5.6.120.0620.02818.06
5.6.110.0030.03218.24
5.6.100.1620.02918.15
5.6.90.1840.02418.16
5.6.80.2230.02017.76
5.6.70.1950.02217.85
5.6.60.1880.02317.79
5.6.50.1930.02417.72
5.6.40.2150.02517.68
5.6.30.2070.02617.74
5.6.20.1810.02217.84
5.6.10.1800.02517.78
5.6.00.1830.02617.69
5.5.380.0060.01315.57
5.5.370.0080.00815.79
5.5.360.0030.01315.67
5.5.350.0210.04518.08
5.5.340.0050.04216.83
5.5.330.0730.04117.98
5.5.320.1770.02317.93
5.5.310.2250.02317.96
5.5.300.1610.02117.87
5.5.290.1670.02617.89
5.5.280.0100.02817.90
5.5.270.0080.04017.93
5.5.260.1740.02617.92
5.5.250.1870.02417.86
5.5.240.2160.02617.65
5.5.230.1830.02517.61
5.5.220.1670.02417.48
5.5.210.1880.02517.67
5.5.200.2020.02017.61
5.5.190.2150.02817.61
5.5.180.2180.02617.44
5.5.170.0040.01515.53
5.5.160.1980.02317.46
5.5.150.1910.03117.60
5.5.140.1820.02717.58
5.5.130.2040.02017.42
5.5.120.1560.02017.39
5.5.110.1780.02517.51
5.5.100.1790.02517.43
5.5.90.1850.02617.31
5.5.80.1840.02317.40
5.5.70.2700.02417.54
5.5.60.2000.02417.62
5.5.50.2050.02217.55
5.5.40.2000.03017.57
5.5.30.2210.02317.70
5.5.20.2210.02717.67
5.5.10.2250.02417.55
5.5.00.2040.02217.66
5.4.450.1660.01916.25
5.4.440.0070.02316.34
5.4.430.0620.03616.26
5.4.420.1830.02216.32
5.4.410.1700.02416.22
5.4.400.2190.02416.12
5.4.390.1830.01816.17
5.4.380.1720.02316.17
5.4.370.1720.02616.14
5.4.360.2140.02216.11
5.4.350.2070.02716.12
5.4.340.1980.01716.17
5.4.330.0040.00913.20
5.4.320.1850.02116.10
5.4.310.2050.02316.12
5.4.300.1670.01816.10
5.4.290.1890.01916.11
5.4.280.1810.02216.17
5.4.270.1880.02216.14
5.4.260.1830.02316.15
5.4.250.1680.02516.09
5.4.240.1780.02416.15
5.4.230.1720.02216.08
5.4.220.2020.02316.12
5.4.210.2240.01816.16
5.4.200.2130.02716.01
5.4.190.2270.01916.13
5.4.180.2240.02016.09
5.4.170.1960.02216.18
5.4.160.2090.02016.11
5.4.150.2200.02316.07
5.4.140.1970.02014.87
5.4.130.2220.02314.86
5.4.120.1720.02214.71
5.4.110.1790.02014.81
5.4.100.2220.02214.77
5.4.90.2170.02214.76
5.4.80.2170.02614.75
5.4.70.2150.02514.77
5.4.60.2100.01914.76
5.4.50.2070.03014.71
5.4.40.2040.02414.70
5.4.30.2210.01914.83
5.4.20.2150.02414.76
5.4.10.0140.01714.81
5.4.00.0060.02614.50
5.3.290.1880.02313.94
5.3.280.2200.01713.92
5.3.270.2210.02313.83
5.3.260.2120.02213.92
5.3.250.2180.02513.93
5.3.240.1900.03013.90
5.3.230.1910.02313.88
5.3.220.2290.02113.86
5.3.210.1940.02413.81
5.3.200.1970.02613.88
5.3.190.2180.02713.97
5.3.180.1950.02613.98
5.3.170.2130.02513.81
5.3.160.2170.02413.99
5.3.150.1850.02013.93
5.3.140.2210.02213.90
5.3.130.2170.03113.87
5.3.120.2150.02513.86
5.3.110.0130.03813.82
5.3.100.1020.02713.64
5.3.90.2190.02313.62
5.3.80.2000.02713.55
5.3.70.1990.02213.60
5.3.60.2190.02113.59
5.3.50.2050.02113.52
5.3.40.1690.02413.63
5.3.30.1690.02213.54
5.3.20.1730.02013.45
5.3.10.1670.02413.33
5.3.00.1660.02613.36
5.2.170.2870.02310.96
5.2.160.2800.02711.07
5.2.150.2700.03011.15
5.2.140.2770.02711.13
5.2.130.2730.03011.16
5.2.120.2770.02311.27
5.2.110.2730.02711.10
5.2.100.2670.03711.10
5.2.90.2730.03011.16
5.2.80.3430.03310.91
5.2.70.2770.02711.09
5.2.60.1730.02711.02
5.2.50.0030.04311.05
5.2.40.0000.05010.80
5.2.30.0100.06010.96
5.2.20.0100.03710.82
5.2.10.2700.02010.94
5.2.00.2600.03310.88
5.1.60.3070.0239.96
5.1.50.2570.0279.99
5.1.40.2470.0279.94
5.1.30.2000.03010.39
5.1.20.2830.01310.34
5.1.10.2900.02010.13
5.1.00.2770.02310.03
5.0.50.1500.0278.62
5.0.40.1430.0208.53
5.0.30.1530.0308.29
5.0.20.1300.0238.22
5.0.10.1500.0278.24
5.0.00.1230.0278.23
4.4.90.1070.0175.89
4.4.80.0030.0235.81
4.4.70.1200.0205.82
4.4.60.1170.0175.80
4.4.50.1570.0175.81
4.4.40.1630.0275.93
4.4.30.1300.0175.79
4.4.20.1270.0135.93
4.4.10.1300.0175.96
4.4.00.1630.0305.88
4.3.110.1700.0205.80
4.3.100.1530.0205.80
4.3.90.1570.0175.75
4.3.80.1330.0305.82
4.3.70.1230.0135.81
4.3.60.1230.0175.81
4.3.50.1500.0175.81
4.3.40.1630.0235.73
4.3.30.0700.0175.36
4.3.20.0670.0175.36
4.3.10.0700.0175.36
4.3.00.0800.0205.36

preferences:
42.78 ms | 401 KiB | 5 Q