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($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.70.0040.01118.65
8.3.60.0060.01216.88
8.3.50.0100.00622.20
8.3.40.0120.00319.10
8.3.30.0090.00619.21
8.3.20.0000.00820.00
8.3.10.0050.00323.61
8.3.00.0080.00020.88
8.2.190.0060.01020.50
8.2.180.0120.00616.88
8.2.170.0110.00722.96
8.2.160.0060.00920.38
8.2.150.0040.00424.18
8.2.140.0050.00524.66
8.2.130.0040.00426.16
8.2.120.0080.00022.38
8.2.110.0040.00420.39
8.2.100.0040.00717.84
8.2.90.0000.01219.23
8.2.80.0000.00818.04
8.2.70.0030.00717.86
8.2.60.0000.00917.93
8.2.50.0070.00418.07
8.2.40.0050.00318.22
8.2.30.0040.00418.25
8.2.20.0050.00317.97
8.2.10.0030.00617.91
8.2.00.0000.00817.87
8.1.280.0040.01125.92
8.1.270.0040.00423.97
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0100.00023.98
8.1.230.0080.00423.95
8.1.220.0030.00517.77
8.1.210.0000.00818.77
8.1.200.0030.00717.60
8.1.190.0040.00417.53
8.1.180.0060.00318.10
8.1.170.0000.00918.91
8.1.160.0030.00522.07
8.1.150.0020.00518.76
8.1.140.0050.00317.59
8.1.130.0000.00717.87
8.1.120.0030.00517.68
8.1.110.0000.00817.49
8.1.100.0000.00817.66
8.1.90.0000.00717.54
8.1.80.0000.00817.63
8.1.70.0040.00417.61
8.1.60.0030.00717.78
8.1.50.0000.00817.66
8.1.40.0030.00617.62
8.1.30.0040.00417.75
8.1.20.0040.00417.80
8.1.10.0050.00317.64
8.1.00.0120.00017.66
8.0.300.0060.00318.77
8.0.290.0000.00917.30
8.0.280.0000.00818.50
8.0.270.0000.00717.27
8.0.260.0070.00017.02
8.0.250.0050.00217.12
8.0.240.0050.00217.19
8.0.230.0000.00717.19
8.0.220.0000.00717.17
8.0.210.0030.00517.17
8.0.200.0050.00217.18
8.0.190.0000.00817.16
8.0.180.0040.00417.11
8.0.170.0000.00817.15
8.0.160.0030.00517.21
8.0.150.0040.00417.06
8.0.140.0040.00417.13
8.0.130.0030.00313.50
8.0.120.0060.00317.14
8.0.110.0020.00517.14
8.0.100.0000.00817.03
8.0.90.0000.00817.10
8.0.80.0120.00317.09
8.0.70.0080.00017.02
8.0.60.0100.00016.96
8.0.50.0080.00017.07
8.0.30.0120.00817.21
8.0.20.0120.01017.42
8.0.10.0080.00017.16
8.0.00.0100.00816.84
7.4.330.0060.00015.18
7.4.320.0040.00416.82
7.4.300.0000.00616.74
7.4.290.0040.00416.65
7.4.280.0040.00416.77
7.4.270.0040.00416.76
7.4.260.0040.00416.83
7.4.250.0000.00816.81
7.4.240.0000.00916.77
7.4.230.0050.00216.72
7.4.220.0280.01216.77
7.4.210.0060.00916.77
7.4.200.0040.00416.95
7.4.190.0040.00416.97
7.4.160.0100.00816.84
7.4.150.0160.00317.40
7.4.140.0220.01517.86
7.4.130.0030.01416.94
7.4.120.0050.01216.90
7.4.110.0060.01216.59
7.4.100.0070.01116.74
7.4.90.0100.01016.83
7.4.80.0120.00619.39
7.4.70.0070.01016.71
7.4.60.0070.01016.59
7.4.50.0090.00016.66
7.4.40.0060.01022.77
7.4.30.0100.00716.59
7.4.10.0130.00315.23
7.4.00.0050.01115.16
7.3.330.0050.00013.39
7.3.320.0000.00713.46
7.3.310.0030.00316.57
7.3.300.0040.00316.48
7.3.290.0080.00816.59
7.3.280.0100.00916.57
7.3.270.0140.00417.40
7.3.260.0090.01316.81
7.3.250.0100.00816.66
7.3.240.0000.01716.70
7.3.230.0120.00616.64
7.3.210.0070.01116.63
7.3.200.0100.01419.39
7.3.190.0060.01216.86
7.3.180.0130.00316.69
7.3.170.0090.00916.72
7.3.160.0030.01616.70
7.3.130.0120.00615.00
7.3.120.0060.01015.28
7.3.110.0070.01014.69
7.3.100.0000.01415.36
7.3.90.0000.01415.01
7.3.80.0000.00815.04
7.3.70.0120.00615.10
7.3.60.0060.00615.04
7.3.50.0060.00615.08
7.3.40.0070.00414.81
7.3.30.0060.01014.96
7.3.20.0040.00816.97
7.3.10.0070.00716.89
7.3.00.0040.00816.81
7.2.330.0110.00616.99
7.2.320.0170.00316.89
7.2.310.0100.01017.12
7.2.300.0030.01516.96
7.2.290.0040.01517.02
7.2.260.0030.01314.99
7.2.250.0040.01515.37
7.2.240.0030.01015.32
7.2.230.0070.01115.25
7.2.220.0070.01015.45
7.2.210.0040.00415.26
7.2.200.0080.00615.25
7.2.190.0040.01215.37
7.2.180.0040.00815.12
7.2.170.0120.00415.12
7.2.160.0030.01315.32
7.2.150.0030.01217.35
7.2.140.0100.00717.02
7.2.130.0020.01117.21
7.2.120.0080.00517.20
7.2.110.0040.00817.09
7.2.100.0070.00817.27
7.2.90.0080.00617.18
7.2.80.0070.00717.08
7.2.70.0060.01217.07
7.2.60.0050.01117.20
7.2.50.0080.00717.13
7.2.40.0080.00617.11
7.2.30.0060.00817.18
7.2.20.0060.00717.11
7.2.10.0060.00817.13
7.2.00.0070.00817.77
7.1.330.0100.00316.24
7.1.320.0110.00716.19
7.1.310.0000.01216.12
7.1.300.0080.00815.98
7.1.290.0030.01015.90
7.1.280.0070.00715.76
7.1.270.0060.00315.96
7.1.260.0160.00016.01
7.1.250.0010.01416.14
7.1.240.0070.00516.18
7.1.230.0050.01115.94
7.1.220.0050.01015.77
7.1.210.0080.00315.86
7.1.200.0050.00815.99
7.1.190.0030.00915.97
7.1.180.0050.00615.91
7.1.170.0050.00816.20
7.1.160.0040.00416.01
7.1.150.0040.00616.00
7.1.140.0020.01316.01
7.1.130.0040.01115.89
7.1.120.0040.01115.90
7.1.110.0090.00516.03
7.1.100.0040.00916.88
7.1.90.0000.01316.01
7.1.80.0050.00716.06
7.1.70.0060.00816.45
7.1.60.0030.01317.04
7.1.50.0040.01516.28
7.1.40.0070.00615.97
7.1.30.0060.00616.05
7.1.20.0030.01116.06
7.1.10.0080.01015.94
7.1.00.0050.03218.18
7.0.330.0080.00515.64
7.0.320.0050.00815.61
7.0.310.0090.00415.53
7.0.300.0070.00915.81
7.0.290.0070.00715.56
7.0.280.0030.01015.56
7.0.270.0050.00815.51
7.0.260.0050.01115.36
7.0.250.0050.01015.50
7.0.240.0000.01215.64
7.0.230.0030.01115.54
7.0.220.0040.00715.87
7.0.210.0040.00915.68
7.0.200.0050.00716.11
7.0.190.0050.00915.66
7.0.180.0020.01115.57
7.0.170.0040.01015.79
7.0.160.0030.01015.66
7.0.150.0030.01115.59
7.0.140.0100.02317.85
7.0.130.0070.00715.74
7.0.120.0070.00515.57
7.0.110.0070.00815.62
7.0.100.0050.01015.73
7.0.90.0060.01015.72
7.0.80.0010.02116.98
7.0.70.0120.02217.17
7.0.60.0030.02417.05
7.0.50.0080.01517.36
7.0.40.0020.02415.73
7.0.30.0090.02815.86
7.0.20.0080.02615.90
7.0.10.0080.01915.92
7.0.00.0050.03215.75
5.6.400.0070.00714.45
5.6.390.0060.00614.66
5.6.380.0050.00914.31
5.6.370.0020.01114.38
5.6.360.0090.00714.62
5.6.350.0060.00714.72
5.6.340.0020.01414.74
5.6.330.0070.00414.70
5.6.320.0090.00314.49
5.6.310.0050.00814.68
5.6.300.0080.00614.58
5.6.290.0030.01114.30
5.6.280.0050.02816.66
5.6.270.0070.00814.59
5.6.260.0040.01114.57
5.6.250.0050.01214.78
5.6.240.0030.01214.46
5.6.230.0060.02116.48
5.6.220.0100.02716.57
5.6.210.0030.03416.54
5.6.200.0030.02216.63
5.6.190.0060.02716.72
5.6.180.0090.01716.77
5.6.170.0080.01816.81
5.6.160.0090.03016.70
5.6.150.0110.02516.67
5.6.140.0060.03116.71
5.6.130.0040.02516.72
5.6.120.0060.02016.83
5.6.110.0020.03016.65
5.6.100.0050.03316.62
5.6.90.0040.02616.70
5.6.80.0040.02416.44
5.6.70.0060.03116.52
5.6.60.0080.03016.50
5.6.50.0090.03116.50
5.6.40.0070.01916.48
5.6.30.0080.03116.37
5.6.20.0080.02816.41
5.6.10.0060.03016.35
5.6.00.0080.01616.42
5.5.380.0030.01012.98
5.5.370.0080.02315.51
5.5.360.0040.03315.36
5.5.350.0070.02915.48
5.5.340.0070.03015.50
5.5.330.0050.03015.60
5.5.320.0030.02215.54
5.5.310.0040.02415.38
5.5.300.0060.02915.49
5.5.290.0080.03215.60
5.5.280.0050.02215.59
5.5.270.0080.02115.68
5.5.260.0060.02115.63
5.5.250.0100.02515.51
5.5.240.0040.02415.40
5.5.230.0040.02215.31
5.5.220.0080.02715.21
5.5.210.0080.03115.30
5.5.200.0050.02015.28
5.5.190.0080.02515.21
5.5.180.0020.02515.23
5.5.170.0030.01012.68
5.5.160.0080.02915.22
5.5.150.0060.02615.40
5.5.140.0070.01915.37
5.5.130.0060.01915.23
5.5.120.0080.02915.32
5.5.110.0110.02015.22
5.5.100.0070.02115.27
5.5.90.0070.03015.13
5.5.80.0030.02415.14
5.5.70.0030.02115.27
5.5.60.0060.02515.27
5.5.50.0070.02715.23
5.5.40.0060.03215.43
5.5.30.0080.02315.10
5.5.20.0080.02915.21
5.5.10.0090.02015.26
5.5.00.0050.03015.13
5.4.450.0020.03114.45
5.4.440.0090.02514.45
5.4.430.0070.02814.46
5.4.420.0060.02714.42
5.4.410.0080.01714.41
5.4.400.0060.01714.31
5.4.390.0040.01814.33
5.4.380.0090.02214.30
5.4.370.0060.03214.34
5.4.360.0060.01914.41
5.4.350.0070.03114.25
5.4.340.0040.03114.36
5.4.330.0020.00812.01
5.4.320.0090.02214.34
5.4.310.0050.03214.26
5.4.300.0050.01814.30
5.4.290.0080.02914.28
5.4.280.0030.03314.33
5.4.270.0090.02914.35
5.4.260.0070.02714.24
5.4.250.0040.02114.24
5.4.240.0090.02214.33
5.4.230.0050.02314.32
5.4.220.0030.03314.23
5.4.210.0040.02814.23
5.4.200.0030.03114.23
5.4.190.0090.02414.42
5.4.180.0030.02614.28
5.4.170.0050.01714.29
5.4.160.0020.03314.27
5.4.150.0040.01814.28
5.4.140.0040.02813.41
5.4.130.0100.02213.43
5.4.120.0010.02313.45
5.4.110.0040.01913.39
5.4.100.0020.03013.39
5.4.90.0050.01713.46
5.4.80.0070.01313.43
5.4.70.0040.01913.42
5.4.60.0040.01513.46
5.4.50.0040.01813.43
5.4.40.0020.01813.38
5.4.30.0040.01713.40
5.4.20.0070.01113.46
5.4.10.0050.01413.44
5.4.00.0040.01413.16
5.3.290.0050.03212.92
5.3.280.0010.02512.89
5.3.270.0070.03512.83
5.3.260.0050.02412.88
5.3.250.0100.03812.88
5.3.240.0020.02712.89
5.3.230.0050.02212.83
5.3.220.0080.02012.84
5.3.210.0050.03712.84
5.3.200.0080.02212.80
5.3.190.0060.01912.88
5.3.180.0020.02312.88
5.3.170.0020.02712.88
5.3.160.0050.01812.81
5.3.150.0040.02212.88
5.3.140.0030.02112.81
5.3.130.0020.02112.86
5.3.120.0020.02312.87
5.3.110.0020.02212.89
5.3.100.0030.01812.60
5.3.90.0060.02012.58
5.3.80.0030.02312.59
5.3.70.0020.02212.56
5.3.60.0020.01812.60
5.3.50.0020.01912.58
5.3.40.0050.01812.57
5.3.30.0070.01812.55
5.3.20.0000.01912.42
5.3.10.0040.01612.43
5.3.00.0030.02212.39
5.2.170.0030.01611.49
5.2.160.0030.01511.49
5.2.150.0050.01311.49
5.2.140.0030.01911.49
5.2.130.0060.01311.49
5.2.120.0030.01511.49
5.2.110.0020.01611.49
5.2.100.0030.01311.49
5.2.90.0030.01511.49
5.2.80.0060.01311.49
5.2.70.0020.01411.49
5.2.60.0020.01511.49
5.2.50.0040.01311.49
5.2.40.0050.01311.49
5.2.30.0030.01211.49
5.2.20.0050.01211.49
5.2.10.0030.01811.49
5.2.00.0050.01311.49
5.1.60.0050.01711.49
5.1.50.0020.01411.49
5.1.40.0080.01211.49
5.1.30.0000.01711.49
5.1.20.0000.02311.49
5.1.10.0030.01511.49
5.1.00.0000.01811.49
5.0.50.0030.00811.49
5.0.40.0040.01011.49
5.0.30.0000.02011.49
5.0.20.0030.00811.49
5.0.10.0020.01211.49
5.0.00.0030.01311.49
4.4.90.0030.00611.49
4.4.80.0000.01011.49
4.4.70.0030.00811.49
4.4.60.0030.00711.49
4.4.50.0020.00811.49
4.4.40.0040.01011.49
4.4.30.0000.01011.49
4.4.20.0040.01011.49
4.4.10.0020.00811.49
4.4.00.0020.01411.49
4.3.110.0000.00911.49
4.3.100.0010.00911.49
4.3.90.0000.00911.49
4.3.80.0000.01411.49
4.3.70.0000.00911.49
4.3.60.0020.00811.49
4.3.50.0030.00911.49
4.3.40.0030.01111.49
4.3.30.0000.01011.49
4.3.20.0030.00611.49
4.3.10.0020.01011.49
4.3.00.0000.01011.49

preferences:
77.58 ms | 401 KiB | 5 Q