3v4l.org

run code in 300+ PHP versions simultaneously
<?php ini_set('display_errors', 1); /** * This script check how PHP makes HTTPS (SSL/TLS) requests using PHP Streams * or cURL. Configuration options are passed as GET parameters, for example: * http://localhost/checksslcontext.php?reconfigure=1 * * Configuration: * http://localhost/checksslcontext.php * Basic PHP Streams using file_get_contents(). Default settings. * http://localhost/checksslcontext.php?reconfigure=1 * As above but reconfigures SSL Context for PHP Streams to be secure. * It will also reconfigure cURL (if selected) to use the Mozilla ciphersuite. * http://localhost/checksslcontext.php?curl=1 * Use cURL instead of PHP Streams (good to compare!) * http://localhost/checksslcontext.php?qualys=1 * Use the Qualys SSL Labs service instead of http://www.howsmyssl.com * * This script reflects result output from howsmyssl.com and ssllabs.com to your browser. */ $reconfigure = isset($_GET['reconfigure']) ? (bool) $_GET['reconfigure'] : false; $usecurl = true; $checkqualys = isset($_GET['qualys']) ? (bool) $_GET['qualys'] : false; /** * https://wiki.mozilla.org/Security/Server_Side_TLS#Recommended_Ciphersuite */ $ciphers = implode(':', array( 'ECDHE-RSA-AES128-GCM-SHA256', 'ECDHE-ECDSA-AES128-GCM-SHA256', 'ECDHE-RSA-AES256-GCM-SHA384', 'ECDHE-ECDSA-AES256-GCM-SHA384', 'DHE-RSA-AES128-GCM-SHA256', 'DHE-DSS-AES128-GCM-SHA256', 'kEDH+AESGCM', 'ECDHE-RSA-AES128-SHA256', 'ECDHE-ECDSA-AES128-SHA256', 'ECDHE-RSA-AES128-SHA', 'ECDHE-ECDSA-AES128-SHA', 'ECDHE-RSA-AES256-SHA384', 'ECDHE-ECDSA-AES256-SHA384', 'ECDHE-RSA-AES256-SHA', 'ECDHE-ECDSA-AES256-SHA', 'DHE-RSA-AES128-SHA256', 'DHE-RSA-AES128-SHA', 'DHE-DSS-AES128-SHA256', 'DHE-RSA-AES256-SHA256', 'DHE-DSS-AES256-SHA', 'DHE-RSA-AES256-SHA', 'AES128-GCM-SHA256', 'AES256-GCM-SHA384', 'ECDHE-RSA-RC4-SHA', 'ECDHE-ECDSA-RC4-SHA', 'AES128', 'AES256', 'RC4-SHA', 'HIGH', '!aNULL', '!eNULL', '!EXPORT', '!DES', '!3DES', '!MD5', '!PSK' )); if (!$checkqualys) { $url = 'https://www.howsmyssl.com'; $domain = 'howsmyssl.com'; } else { $url = 'https://www.ssllabs.com/ssltest/viewMyClient.html'; $domain = 'www.ssllabs.com'; } $context = stream_context_create(array( 'ssl' => array( 'ciphers' => $ciphers, 'verify_peer' => true, 'cafile' => '/etc/ssl/certs/ca-certificates.crt', // <-- EDIT FOR NON-DEBIAN/UBUNTU SYSTEMS 'CN_match' => $domain, 'verify_depth' => 3, 'disable_compression' => true, 'SNI_enabled' => true, 'SNI_server_name' => $domain ) )); if (!$usecurl) { if ($reconfigure) { $html = file_get_contents($url, null, $context); } else { $html = file_get_contents($url); // This default will be BAD! } } else { $ch = curl_init($url); if ($reconfigure) { curl_setopt($ch, CURLOPT_SSL_CIPHER_LIST, $ciphers); } curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $html = curl_exec($ch); curl_close($ch); } if (!$checkqualys) { $html = str_replace('href="/', 'href="https://www.howsmyssl.com/', $html); } else { $html = str_replace('href="/', 'href="https://www.ssllabs.com/', $html); } echo $html;

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.40.0180.00018.71
8.3.30.0060.00918.79
8.3.20.0000.00820.38
8.3.10.0040.00423.52
8.3.00.0040.00419.38
8.2.170.0070.00722.96
8.2.160.0090.00620.32
8.2.150.0040.00424.18
8.2.140.0000.00724.66
8.2.130.0080.00017.50
8.2.120.0080.00026.35
8.2.110.0070.00321.11
8.2.100.0080.00417.97
8.2.90.0080.00019.21
8.2.80.0050.00317.97
8.2.70.0000.00917.75
8.2.60.0050.00318.18
8.2.50.0060.00318.07
8.2.40.0000.00719.39
8.2.30.0000.00720.54
8.2.20.0090.00017.75
8.2.10.0070.00018.14
8.2.00.0000.00718.14
8.1.270.0070.00423.88
8.1.260.0070.00028.09
8.1.250.0080.00028.09
8.1.240.0060.00322.46
8.1.230.0110.00019.00
8.1.220.0030.00617.74
8.1.210.0000.00918.77
8.1.200.0030.00617.38
8.1.190.0070.00017.82
8.1.180.0000.00818.10
8.1.170.0080.00018.69
8.1.160.0000.00821.93
8.1.150.0000.00919.05
8.1.140.0080.00019.67
8.1.130.0000.00717.73
8.1.120.0030.00417.47
8.1.110.0040.00417.54
8.1.100.0040.00417.41
8.1.90.0000.00817.51
8.1.80.0000.00717.42
8.1.70.0040.00417.52
8.1.60.0030.00617.63
8.1.50.0040.00417.44
8.1.40.0040.00417.53
8.1.30.0000.00817.68
8.1.20.0040.00417.66
8.1.10.0040.00417.60
8.1.00.0040.00417.52
8.0.300.0030.00518.77
8.0.290.0040.00416.88
8.0.280.0000.00718.46
8.0.270.0000.00717.25
8.0.260.0050.00317.16
8.0.250.0000.00717.08
8.0.240.0020.00516.95
8.0.230.0040.00417.08
8.0.220.0060.00316.94
8.0.210.0000.00817.03
8.0.200.0000.00617.09
8.0.190.0000.00817.07
8.0.180.0050.00217.00
8.0.170.0040.00417.04
8.0.160.0040.00416.93
8.0.150.0070.00016.91
8.0.140.0030.00316.91
8.0.130.0000.00813.48
8.0.120.0030.00516.85
8.0.110.0040.00416.97
8.0.100.0000.00716.91
8.0.90.0000.00716.79
8.0.80.0030.01716.86
8.0.70.0000.00817.05
8.0.60.0040.00416.77
8.0.50.0000.00817.05
8.0.30.0070.01217.11
8.0.20.0090.00917.42
8.0.10.0040.00417.13
8.0.00.0040.01616.94
7.4.330.0000.00516.69
7.4.320.0000.00616.57
7.4.300.0030.00316.53
7.4.290.0000.00716.48
7.4.280.0070.00016.61
7.4.270.0030.00316.47
7.4.260.0000.00716.59
7.4.250.0000.00716.50
7.4.240.0020.00516.61
7.4.230.0040.00416.73
7.4.220.0110.01416.49
7.4.210.0070.00716.49
7.4.200.0050.00216.71
7.4.160.0030.01316.54
7.4.150.0030.01517.40
7.4.140.0140.01017.86
7.4.130.0100.01216.47
7.4.120.0110.00916.61
7.4.110.0070.01016.72
7.4.100.0060.01316.68
7.4.90.0090.00916.71
7.4.80.0090.01219.39
7.4.70.0120.01216.84
7.4.60.0100.00616.58
7.4.50.0090.00616.71
7.4.40.0100.00716.69
7.4.30.0160.00616.66
7.4.00.0060.00915.10
7.3.330.0000.00913.36
7.3.320.0030.00313.27
7.3.310.0000.00716.39
7.3.300.0060.00016.50
7.3.290.0070.00816.43
7.3.280.0100.00716.47
7.3.270.0210.01917.40
7.3.260.0030.01516.52
7.3.250.0070.01016.37
7.3.240.0060.01116.37
7.3.230.0060.01216.64
7.3.210.0030.01316.63
7.3.200.0130.00616.61
7.3.190.0150.00416.44
7.3.180.0060.01016.38
7.3.170.0090.01116.46
7.3.160.0160.00016.40
7.3.10.0070.00716.84
7.3.00.0100.00416.77
7.2.330.0090.00916.28
7.2.320.0080.01616.47
7.2.310.0090.00816.67
7.2.300.0130.00316.30
7.2.290.0030.01416.89
7.2.130.0100.00716.91
7.2.120.0090.00616.86
7.2.110.0030.01316.91
7.2.100.0040.00716.90
7.2.90.0030.01316.90
7.2.80.0090.00916.94
7.2.70.0040.01116.75
7.2.60.0100.00516.63
7.2.50.0000.01916.72
7.2.40.0030.00916.53
7.2.30.0070.00716.93
7.2.20.0130.00016.75
7.2.10.0070.00316.65
7.2.00.0040.00718.22
7.1.250.0080.00415.69
7.1.200.0100.00315.55
7.1.100.0500.00715.79
7.1.70.0170.01017.25
7.1.60.0180.00719.36
7.1.50.0070.00316.96
7.1.00.0000.08022.36
7.0.200.0680.00616.55
7.0.60.0030.08719.96
7.0.50.0030.08317.92
7.0.40.0070.08720.40
7.0.30.0530.06320.09
7.0.20.0330.07020.16
7.0.10.0170.07720.30
7.0.00.0070.03720.01
5.6.280.0000.07020.88
5.6.210.0130.04720.58
5.6.200.0100.08718.26
5.6.190.0070.07720.77
5.6.180.0400.06320.35
5.6.170.0270.07020.33
5.6.160.0130.08320.40
5.6.150.0030.04718.19
5.6.140.0100.06318.18
5.6.130.0030.08318.15
5.6.120.0170.06321.02
5.6.110.0100.08021.12
5.6.100.0070.08720.99
5.6.90.0100.06321.03
5.6.80.0200.07320.49
5.5.350.4200.04020.40
5.5.340.0200.06717.95
5.5.330.0130.07720.36
5.5.320.0030.08020.17
5.5.310.0270.07020.20
5.5.300.0030.07017.98
5.5.290.0100.04317.95
5.5.280.0100.03720.88
5.5.270.0070.08720.86
5.5.260.0100.05720.80
5.5.250.0030.05720.71
5.5.240.0200.07020.30

preferences:
54.28 ms | 400 KiB | 5 Q