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($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.0060.01018.63
8.3.50.0050.01422.11
8.3.40.0100.00619.13
8.3.30.0100.00719.10
8.3.20.0070.01319.15
8.3.10.0100.00020.86
8.3.00.0090.00023.61
8.2.180.0130.00316.75
8.2.170.0060.01322.96
8.2.160.0140.00720.36
8.2.150.0150.00424.18
8.2.140.0100.01024.66
8.2.130.0060.00326.16
8.2.120.0120.00017.72
8.2.110.0060.00320.39
8.2.100.0040.00818.03
8.2.90.0030.00619.22
8.2.80.0030.00617.97
8.2.70.0030.00617.75
8.2.60.0070.00717.91
8.2.50.0000.00918.16
8.2.40.0030.00518.34
8.2.30.0080.00019.88
8.2.20.0000.00817.96
8.2.10.0050.00317.87
8.2.00.0040.00417.98
8.1.280.0040.01125.92
8.1.270.0060.00323.99
8.1.260.0030.00626.35
8.1.250.0120.00628.09
8.1.240.0060.00322.19
8.1.230.0110.00017.64
8.1.220.0030.00517.77
8.1.210.0050.00318.77
8.1.200.0000.00917.48
8.1.190.0030.00517.63
8.1.180.0000.00818.10
8.1.170.0030.00618.71
8.1.160.0080.00018.89
8.1.150.0040.00418.73
8.1.140.0050.00317.52
8.1.130.0040.00417.88
8.1.120.0040.00417.71
8.1.110.0040.00417.59
8.1.100.0080.00017.54
8.1.90.0000.00817.61
8.1.80.0040.00417.48
8.1.70.0000.00817.60
8.1.60.0090.00017.75
8.1.50.0000.00817.57
8.1.40.0030.00517.70
8.1.30.0000.00917.81
8.1.20.0040.00417.89
8.1.10.0030.00517.77
8.1.00.0000.00817.58
8.0.300.0040.00418.77
8.0.290.0060.00317.13
8.0.280.0000.00718.48
8.0.270.0080.00017.18
8.0.260.0050.00317.06
8.0.250.0020.00517.23
8.0.240.0090.00317.07
8.0.230.0020.00517.11
8.0.220.0040.00417.02
8.0.210.0040.00417.03
8.0.200.0070.00017.23
8.0.190.0000.00717.16
8.0.180.0000.00717.12
8.0.170.0040.00417.17
8.0.160.0040.00417.11
8.0.150.0000.00817.05
8.0.140.0000.00817.08
8.0.130.0000.00813.65
8.0.120.0030.00617.07
8.0.110.0050.00317.15
8.0.100.0030.00517.16
8.0.90.0080.00017.02
8.0.80.0030.01317.14
8.0.70.0040.00417.16
8.0.60.0080.00016.96
8.0.50.0040.00417.00
8.0.30.0100.00917.50
8.0.20.0090.01117.41
8.0.10.0080.00017.05
8.0.00.0130.00517.11
7.4.330.0000.00614.99
7.4.320.0060.00016.77
7.4.300.0030.00316.76
7.4.290.0040.00416.74
7.4.280.0030.00516.64
7.4.270.0040.00416.61
7.4.260.0030.00313.54
7.4.250.0040.00416.72
7.4.240.0070.00016.87
7.4.230.0000.00716.94
7.4.220.0160.01016.78
7.4.210.0080.01016.81
7.4.200.0040.00416.58
7.4.190.0040.00416.94
7.4.160.0040.01216.68
7.4.150.0000.01817.40
7.4.140.0150.00417.86
7.4.130.0040.01516.76
7.4.120.0100.00816.81
7.4.110.0180.00016.55
7.4.100.0090.00916.94
7.4.90.0140.00516.70
7.4.80.0170.00019.37
7.4.70.0100.01016.80
7.4.60.0100.01016.49
7.4.50.0000.00516.66
7.4.40.0070.01022.27
7.4.30.0120.00616.64
7.4.10.0060.01315.03
7.4.00.0070.01215.25
7.3.330.0000.00513.49
7.3.320.0060.00013.34
7.3.310.0040.00416.49
7.3.300.0000.00716.58
7.3.290.0090.00616.58
7.3.280.0080.01316.58
7.3.270.0110.00717.40
7.3.260.0110.01018.24
7.3.250.0110.01316.66
7.3.240.0120.01216.59
7.3.230.0040.01616.80
7.3.210.0100.01016.61
7.3.200.0120.00619.39
7.3.190.0100.00716.69
7.3.180.0100.00816.77
7.3.170.0040.01716.89
7.3.160.0120.00916.63
7.3.130.0110.00815.34
7.3.120.0110.00615.23
7.3.110.0110.00715.12
7.3.100.0090.00615.14
7.3.90.0030.01015.33
7.3.80.0070.00715.07
7.3.70.0030.00914.91
7.3.60.0100.00614.98
7.3.50.0060.00815.24
7.3.40.0030.01015.17
7.3.30.0130.00314.91
7.3.20.0060.00617.00
7.3.10.0090.00016.88
7.3.00.0030.00616.79
7.2.330.0090.00916.82
7.2.320.0110.00816.71
7.2.310.0040.01616.78
7.2.300.0100.00716.82
7.2.290.0070.01416.88
7.2.260.0040.01515.23
7.2.250.0040.01315.00
7.2.240.0070.01015.39
7.2.230.0060.01015.46
7.2.220.0000.01615.22
7.2.210.0110.00415.39
7.2.200.0100.00315.44
7.2.190.0090.00615.25
7.2.180.0030.00915.36
7.2.170.0000.01115.34
7.2.160.0030.00915.18
7.2.150.0030.01016.81
7.2.140.0030.01017.22
7.2.130.0040.01116.98
7.2.120.0030.00717.23
7.2.110.0070.01016.90
7.2.100.0000.01617.20
7.2.90.0030.00617.22
7.2.80.0100.00317.01
7.2.70.0070.00717.10
7.2.60.0070.00717.21
7.2.50.0070.00717.02
7.2.40.0000.01217.01
7.2.30.0100.00717.15
7.2.20.0000.01517.29
7.2.10.0040.00717.19
7.2.00.0090.00618.35
7.1.330.0030.01516.10
7.1.320.0070.00715.82
7.1.310.0040.01116.19
7.1.300.0070.00316.15
7.1.290.0070.00715.72
7.1.280.0120.00315.90
7.1.270.0120.00315.98
7.1.260.0000.01416.19
7.1.250.0080.00815.93
7.1.240.0060.00916.15
7.1.230.0040.00716.02
7.1.220.0120.00315.71
7.1.210.0060.00616.05
7.1.200.0100.00315.96
7.1.190.0080.00416.04
7.1.180.0030.00916.02
7.1.170.0070.00715.98
7.1.160.0040.01115.97
7.1.150.0070.00716.14
7.1.140.0000.01416.18
7.1.130.0070.00716.08
7.1.120.0040.01116.02
7.1.110.0090.00016.19
7.1.100.0070.00417.31
7.1.90.0040.01116.15
7.1.80.0030.00716.09
7.1.70.0020.01016.80
7.1.60.0060.01317.67
7.1.50.0040.00716.73
7.1.40.0030.01015.96
7.1.30.0070.01016.03
7.1.20.0000.01616.07
7.1.10.0070.00715.97
7.1.00.0010.03819.23
7.0.330.0070.00715.55
7.0.320.0060.00315.69
7.0.310.0110.00715.51
7.0.300.0000.00815.20
7.0.290.0120.00015.68
7.0.280.0030.00915.73
7.0.270.0040.01115.50
7.0.260.0030.00915.77
7.0.250.0000.01315.46
7.0.240.0070.00715.73
7.0.230.0030.01015.54
7.0.220.0130.00015.38
7.0.210.0060.00315.53
7.0.200.1920.00615.23
7.0.190.0040.00815.59
7.0.180.0100.00715.86
7.0.170.0030.01315.64
7.0.160.0100.00315.64
7.0.150.0040.00815.68
7.0.140.0060.03718.85
7.0.130.0040.00815.77
7.0.120.0030.00715.75
7.0.110.0140.00015.65
7.0.100.0090.00615.61
7.0.90.0000.01115.77
7.0.80.0040.00815.57
7.0.70.0030.00615.45
7.0.60.0110.03917.78
7.0.50.0070.04716.84
7.0.40.0070.02417.13
7.0.30.0150.04616.81
7.0.20.0250.03716.91
7.0.10.0180.03816.86
7.0.00.0100.04616.97
5.6.400.0030.00714.20
5.6.390.0100.00714.35
5.6.380.0070.00714.42
5.6.370.0110.00414.44
5.6.360.0030.01014.73
5.6.350.0030.01014.64
5.6.340.0030.00614.39
5.6.330.0030.00714.66
5.6.320.0050.00514.66
5.6.310.0100.00714.31
5.6.300.0070.00714.54
5.6.290.0030.01314.33
5.6.280.0050.03817.79
5.6.270.0000.00914.52
5.6.260.0030.01014.73
5.6.250.0030.01014.92
5.6.240.0060.00614.50
5.6.230.0070.00714.57
5.6.220.0060.01014.39
5.6.210.0020.03017.61
5.6.200.0100.02216.42
5.6.190.0060.04617.53
5.6.180.0150.03317.55
5.6.170.0130.04617.47
5.6.160.0050.02917.49
5.6.150.0030.04916.21
5.6.140.0100.04116.39
5.6.130.0070.03716.27
5.6.120.0050.04717.81
5.6.110.0080.03517.79
5.6.100.0020.02817.82
5.6.90.0070.04517.80
5.6.80.0050.04717.39
5.6.70.0200.04217.43
5.6.60.0120.00614.47
5.6.50.0060.00914.67
5.6.40.0080.00414.35
5.6.30.0040.00814.49
5.6.20.0040.00814.50
5.6.10.0060.00614.38
5.6.00.0060.00314.35
5.5.380.0060.00614.17
5.5.370.0070.00414.70
5.5.360.0060.00914.65
5.5.350.0160.04117.50
5.5.340.0030.02716.20
5.5.330.0060.02917.60
5.5.320.0240.03717.44
5.5.310.0220.03717.17
5.5.300.0030.04616.31
5.5.290.0140.03216.15
5.5.280.0030.03017.68
5.5.270.0060.02717.50
5.5.260.0090.04517.59
5.5.250.0140.03817.43
5.5.240.0060.02017.48
5.5.230.0100.00314.40
5.5.220.0150.00314.20
5.5.210.0060.00914.48
5.5.200.0040.01114.31
5.5.190.0100.00314.47
5.5.180.0040.00814.49
5.5.170.0100.00714.52
5.5.160.0060.00914.29
5.5.150.0060.00314.69
5.5.140.0030.01014.63
5.5.130.0120.00314.11
5.5.120.0060.00614.55
5.5.110.0060.00614.28
5.5.100.0080.00814.32
5.5.90.0130.00314.49
5.5.80.0080.00414.46
5.5.70.0080.00414.64
5.5.60.0000.01014.44
5.5.50.0030.01014.71
5.5.40.0040.00814.52
5.5.30.0090.00914.21
5.5.20.0070.01014.16
5.5.10.0030.01614.41
5.5.00.0100.00714.49
5.4.450.0030.03215.37
5.4.440.0020.04515.29
5.4.430.0030.02815.38
5.4.420.0050.02715.31
5.4.410.0060.02614.95
5.4.400.0030.02515.05
5.4.390.0050.04115.24
5.4.380.0020.04615.00
5.4.370.0050.03315.09
5.4.360.0040.04115.02
5.4.350.0020.02315.33
5.4.340.0050.04215.16
5.4.330.0070.00311.11
5.4.320.0060.02215.05
5.4.310.0020.04315.06
5.4.300.0050.03715.19
5.4.290.0050.02814.95
5.4.280.0010.02615.02
5.4.270.0060.02915.13
5.4.260.0050.04114.87
5.4.250.0030.03115.22
5.4.240.0020.04315.10
5.4.230.0100.03515.11
5.4.220.0030.03515.19
5.4.210.0050.03415.20
5.4.200.0050.02715.13
5.4.190.0070.02715.09
5.4.180.0060.03414.98
5.4.170.0070.03315.13
5.4.160.0020.04015.00
5.4.150.0050.04214.84
5.4.140.0070.03013.89
5.4.130.0030.03313.81
5.4.120.0030.02813.76
5.4.110.0050.02713.90
5.4.100.0040.02013.64
5.4.90.0080.02313.78
5.4.80.0070.02513.79
5.4.70.0050.03513.53
5.4.60.0050.04013.51
5.4.50.0020.03713.75
5.4.40.0050.03513.70
5.4.30.0020.02413.69
5.4.20.0020.03413.69
5.4.10.0070.03813.69
5.4.00.0070.03813.43
5.3.290.0030.03912.63
5.3.280.0050.02712.43
5.3.270.0050.03712.47
5.3.260.0040.03812.67
5.3.250.0060.03812.63
5.3.240.0030.04012.51
5.3.230.0060.02512.57
5.3.220.0020.02712.52
5.3.210.0100.03512.57
5.3.200.0020.04612.53
5.3.190.0000.04512.59
5.3.180.0020.03912.61
5.3.170.0060.03712.59
5.3.160.0020.04312.59
5.3.150.0040.03412.61
5.3.140.0060.02112.58
5.3.130.0050.04012.62
5.3.120.0050.03212.68
5.3.110.0040.03512.60
5.3.100.0030.03812.23
5.3.90.0080.03312.38
5.3.80.0080.02512.32
5.3.70.0050.02012.23
5.3.60.0020.02212.31
5.3.50.0070.02312.22
5.3.40.0070.03712.24
5.3.30.0030.03712.11
5.3.20.0030.03812.13
5.3.10.0070.03511.85
5.3.00.0020.02812.09
5.2.170.0030.03712.40
5.2.160.0000.03712.41
5.2.150.0030.03712.44
5.2.140.0030.06312.48
5.2.130.0030.06312.51
5.2.120.0030.05012.52
5.2.110.0030.05712.55
5.2.100.0070.06012.59
5.2.90.0000.04012.59
5.2.80.0030.03712.61
5.2.70.0000.06012.63
5.2.60.0000.04312.66
5.2.50.0000.03712.66
5.2.40.0030.02712.66
5.2.30.0030.03712.66
5.2.20.0030.04712.66
5.2.10.0030.04312.66
5.2.00.0030.03712.66
5.1.60.0070.02712.66
5.1.50.0030.03312.66
5.1.40.0030.05312.66
5.1.30.0030.05312.66
5.1.20.0030.05312.66
5.1.10.0000.03712.66
5.1.00.0030.03312.66
5.0.50.0000.03712.66
5.0.40.0030.02012.66
5.0.30.0000.06012.66
5.0.20.0000.04312.66
5.0.10.0000.02312.66
5.0.00.0070.03312.66
4.4.90.0030.03712.65
4.4.80.0000.02012.66
4.4.70.0070.02012.66
4.4.60.0070.02012.66
4.4.50.0000.03012.66
4.4.40.0000.03012.66
4.4.30.0000.02312.66
4.4.20.0070.02312.66
4.4.10.0000.03012.66
4.4.00.0070.02712.66
4.3.110.0030.01712.66
4.3.100.0030.03012.66
4.3.90.0000.02012.66
4.3.80.0000.04712.66
4.3.70.0000.03712.66
4.3.60.0000.02712.66
4.3.50.0030.02312.66
4.3.40.0000.05312.66
4.3.30.0030.02312.66
4.3.20.0030.02312.66
4.3.10.0130.01012.66
4.3.00.0000.03712.66

preferences:
37.11 ms | 401 KiB | 5 Q