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($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.70.0080.00816.75
8.3.60.0140.00718.58
8.3.50.0140.00621.14
8.3.40.0060.01219.07
8.3.30.0120.00319.08
8.3.20.0050.00319.02
8.3.10.0120.00320.77
8.3.00.0030.00521.85
8.2.180.0150.00616.75
8.2.170.0130.00922.96
8.2.160.0170.00320.41
8.2.150.0080.00024.18
8.2.140.0150.00024.66
8.2.130.0080.00026.16
8.2.120.0040.01219.86
8.2.110.0030.00621.09
8.2.100.0080.00417.88
8.2.90.0080.00019.26
8.2.80.0040.00418.04
8.2.70.0070.00417.73
8.2.60.0060.00318.01
8.2.50.0000.00918.07
8.2.40.0060.00318.17
8.2.30.0040.00419.89
8.2.20.0030.00617.87
8.2.10.0050.00319.77
8.2.00.0070.00317.89
8.1.280.0090.00625.92
8.1.270.0090.00623.99
8.1.260.0030.00526.35
8.1.250.0080.00028.09
8.1.240.0030.00722.55
8.1.230.0110.00020.96
8.1.220.0090.00018.77
8.1.210.0040.00418.91
8.1.200.0040.00417.48
8.1.190.0090.00017.53
8.1.180.0040.00418.10
8.1.170.0090.00018.83
8.1.160.0080.00018.92
8.1.150.0080.00018.82
8.1.140.0000.00817.54
8.1.130.0030.00517.79
8.1.120.0040.00417.56
8.1.110.0040.00417.55
8.1.100.0000.00817.52
8.1.90.0040.00417.62
8.1.80.0030.00517.53
8.1.70.0050.00217.63
8.1.60.0060.00317.75
8.1.50.0040.00417.66
8.1.40.0030.00617.71
8.1.30.0000.00817.82
8.1.20.0090.00017.79
8.1.10.0000.00817.66
8.1.00.0060.00317.70
8.0.300.0030.00819.90
8.0.290.0000.00817.00
8.0.280.0030.00318.45
8.0.270.0000.00717.22
8.0.260.0030.00316.96
8.0.250.0000.00817.10
8.0.240.0080.00417.23
8.0.230.0000.00717.19
8.0.220.0000.00717.13
8.0.210.0040.00417.14
8.0.200.0000.00717.19
8.0.190.0000.00817.18
8.0.180.0040.00417.07
8.0.170.0050.00317.05
8.0.160.0040.00417.05
8.0.150.0050.00317.14
8.0.140.0040.00417.10
8.0.130.0040.00413.56
8.0.120.0040.00416.99
8.0.110.0040.00417.05
8.0.100.0070.00017.23
8.0.90.0050.00317.00
8.0.80.0100.00617.02
8.0.70.0000.00817.20
8.0.60.0060.00317.10
8.0.50.0080.00016.95
8.0.30.0100.01017.40
8.0.20.0100.01117.40
8.0.10.0080.00017.13
8.0.00.0130.00716.99
7.4.330.0000.00615.06
7.4.320.0030.00316.79
7.4.300.0030.00316.75
7.4.290.0000.00716.82
7.4.280.0040.00416.74
7.4.270.0060.00316.83
7.4.260.0060.00013.48
7.4.250.0040.00416.85
7.4.240.0040.00416.68
7.4.230.0000.00816.95
7.4.220.0100.00916.84
7.4.210.0060.01216.78
7.4.200.0000.00816.64
7.4.190.0000.00716.89
7.4.160.0100.00716.76
7.4.150.0180.00017.40
7.4.140.0150.00917.86
7.4.130.0050.01616.85
7.4.120.0100.00816.71
7.4.110.0140.00416.80
7.4.100.0110.01516.81
7.4.90.0050.01616.79
7.4.80.0060.01219.37
7.4.70.0120.00616.67
7.4.60.0080.00816.65
7.4.50.0000.00516.72
7.4.40.0170.00022.27
7.4.30.0100.00816.77
7.4.00.0030.01215.12
7.3.330.0050.00013.45
7.3.320.0060.00013.44
7.3.310.0050.00216.44
7.3.300.0000.00716.55
7.3.290.0110.00316.59
7.3.280.0110.00716.53
7.3.270.0060.01217.40
7.3.260.0140.01118.24
7.3.250.0160.00516.82
7.3.240.0060.01216.76
7.3.230.0070.01016.87
7.3.210.0070.01016.55
7.3.200.0100.00719.39
7.3.190.0120.00616.73
7.3.180.0100.01316.45
7.3.170.0100.01016.75
7.3.160.0140.00316.46
7.3.120.0040.01514.98
7.2.330.0150.00416.83
7.2.320.0060.01216.89
7.2.310.0140.00616.84
7.2.300.0070.01116.79
7.2.290.0070.01016.93
7.2.90.0120.00615.01
7.2.80.1280.00514.59
7.2.70.1150.00915.26
7.2.60.0830.01515.38
7.2.50.1160.00615.43
7.2.40.1060.00915.39
7.2.30.1240.01015.34
7.2.20.1010.00815.09
7.2.10.1090.01015.16
7.2.00.1040.01015.04
7.1.210.0390.00614.21
7.1.200.1180.00313.96
7.1.190.0200.00814.11
7.1.180.0290.00514.16
7.1.170.1040.01414.36
7.1.160.1390.01214.07
7.1.150.0760.01314.21
7.1.140.0990.00314.23
7.1.130.1200.00714.25
7.1.120.0800.00814.23
7.1.110.0230.01014.00
7.1.100.0800.01014.33
7.1.90.0190.00314.15
7.1.80.0970.00714.11
7.1.70.0870.01214.17
7.1.60.0970.00331.61
7.1.50.1240.00331.73
7.1.40.0980.02331.55
7.1.30.1080.01032.01
7.1.20.1490.00631.78
7.1.10.1590.01214.07
7.1.00.0880.01013.88
7.0.310.0860.00713.86
7.0.300.0900.01313.88
7.0.290.0940.00613.92
7.0.280.1070.01313.61
7.0.270.1050.00913.83
7.0.260.1370.01613.95
7.0.250.1490.00013.73
7.0.240.0890.00713.51
7.0.230.0180.00613.50
7.0.220.0890.00613.50
7.0.210.0460.00613.70
7.0.200.0630.00913.86
7.0.190.0990.01613.59
7.0.180.0580.00813.71
7.0.170.0980.01113.77
7.0.160.0320.01313.89
7.0.150.0650.00313.99
7.0.140.0860.01313.77
7.0.130.0680.01813.96
7.0.120.0840.00813.90
7.0.110.1100.00313.77
7.0.100.0740.00913.86
7.0.90.0870.00613.56
7.0.80.1200.00413.91
7.0.70.0710.01013.84
7.0.60.0840.00813.79
7.0.50.1440.00314.08
7.0.40.0730.01113.97
7.0.30.0460.01213.70
7.0.20.0690.00913.99
7.0.10.0680.00613.65
7.0.00.0390.00713.60
5.6.300.0090.01214.30
5.6.290.0160.00714.24
5.6.280.0230.00014.64
5.6.270.0110.01114.63
5.6.260.0120.01114.81
5.6.250.0090.01314.43
5.6.240.0160.00614.61
5.6.230.0260.00814.70
5.6.220.0220.00314.65
5.6.210.0170.00714.55
5.6.200.0110.01214.60
5.6.190.0220.00314.64
5.6.180.0180.00514.61
5.6.170.0030.01814.50
5.6.160.0130.00914.57
5.6.150.0230.00914.59
5.6.140.0080.01214.53
5.6.130.0190.00314.56
5.6.120.0160.00814.68
5.6.110.0070.01414.68
5.6.100.0110.00714.59
5.6.90.0170.00614.24
5.6.80.0170.00614.44
5.6.70.0160.00314.40
5.6.60.0110.01114.27
5.6.50.0100.01114.34
5.6.40.0110.00814.50
5.6.30.0170.00714.36
5.6.20.0160.00514.37
5.6.10.0090.01214.41
5.6.00.0130.01014.38
5.5.380.0110.00611.36
5.5.370.0110.00611.34
5.5.360.0070.01111.34
5.5.350.0110.00611.36
5.5.340.0110.00511.20
5.5.330.0050.01011.11
5.5.320.0050.01011.21
5.5.310.0100.00711.25
5.5.300.0160.00011.13
5.5.290.0070.01011.45
5.5.280.0130.00411.10
5.5.270.0120.00311.29
5.5.260.0100.00310.93
5.5.250.0060.00811.06
5.5.240.0100.00711.18
5.5.230.0080.00511.27
5.5.220.0160.00411.18
5.5.210.0080.00511.19
5.5.200.0170.00311.24
5.5.190.0110.00510.89
5.5.180.0100.00511.32
5.5.170.0120.01014.56
5.5.160.0090.00911.02
5.5.150.0120.00411.07
5.5.140.0070.01011.10
5.5.130.0140.00711.25
5.5.120.0050.01111.15
5.5.110.0120.00311.04
5.5.100.0090.00711.38
5.5.90.0070.01011.22
5.5.80.0060.01011.46
5.5.70.0140.00311.04
5.5.60.0070.01010.91
5.5.50.0110.00611.15
5.5.40.0120.00411.03
5.5.30.0110.00611.35
5.5.20.0200.00711.37
5.5.10.0110.00311.01
5.5.00.0070.01011.05
5.4.450.0030.01211.36
5.4.440.0150.00410.98
5.4.430.0040.01211.34
5.4.420.0110.00711.13
5.4.410.0070.01111.17
5.4.400.0110.00411.21
5.4.390.0050.01011.29
5.4.380.0070.01011.07
5.4.370.0100.00711.30
5.4.360.0080.00910.98
5.4.350.0140.00311.35
5.4.340.0080.00610.98
5.4.330.0130.00310.87
5.4.320.0070.01011.05
5.4.310.0120.00411.21
5.4.300.0050.01511.17
5.4.290.0130.00410.84
5.4.280.0090.02011.88
5.4.270.0110.02211.62
5.4.260.0120.02811.74
5.4.250.0090.03411.73
5.4.240.0160.04111.93
5.4.230.0120.03612.01
5.4.220.0180.03311.95
5.4.210.0140.03711.94
5.4.200.0100.05011.89
5.4.190.0180.03812.39
5.4.180.0170.04912.39
5.4.170.0120.03011.89
5.4.160.0090.03212.03
5.4.150.0100.03111.95
5.4.140.0110.02911.83
5.4.130.0100.03211.76
5.4.120.0120.03911.75
5.4.110.0110.02811.67
5.4.100.0120.03011.66
5.4.90.0110.03411.80
5.4.80.0120.03511.72
5.4.70.0170.03411.63
5.4.60.0160.02611.70
5.4.50.0110.02911.75
5.4.40.0160.03511.75
5.4.30.0110.02911.66
5.4.20.0120.02711.68
5.4.10.0110.03011.68
5.4.00.0070.03311.35
5.3.290.0080.00810.64
5.3.280.0110.03111.96
5.3.270.0100.03211.97
5.3.260.0090.03312.04
5.3.250.0090.03212.01
5.3.240.0130.02711.97
5.3.230.0120.02911.97
5.3.220.0110.02811.94
5.3.210.0110.03112.00
5.3.200.0130.03311.94
5.3.190.0170.05512.01
5.3.180.0160.03412.07
5.3.170.0140.02712.03
5.3.160.0130.02712.00
5.3.150.0140.03312.03
5.3.140.0110.03212.02
5.3.130.0120.02912.02
5.3.120.0170.02612.00
5.3.110.0170.04911.98
5.3.100.0120.03211.62
5.3.90.0100.03011.56
5.3.80.0100.03411.55
5.3.70.0170.03911.57
5.3.60.0120.05611.59
5.3.50.0120.03411.49
5.3.40.0170.03711.49
5.3.30.0110.04011.48
5.3.20.0120.03111.32
5.3.10.0110.03611.29
5.3.00.0090.03511.28

preferences:
37.79 ms | 401 KiB | 5 Q