3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ciphers = openssl_get_cipher_methods(); $ciphers_and_aliases = openssl_get_cipher_methods(true); $cipher_aliases = array_diff($ciphers_and_aliases, $ciphers); //print_r($ciphers); //print_r($cipher_aliases); $context = stream_context_create(['ssl' => [ 'ciphers' => 'ECDHE-ECDSA-AES128-SHA' ]]); $html = file_get_contents('https://somesite.com', null, $context);
Output for 7.1.20 - 7.1.25, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Fatal error: Uncaught Error: Call to undefined function openssl_get_cipher_methods() in /in/aToTQ:3 Stack trace: #0 {main} thrown in /in/aToTQ on line 3
Process exited with code 255.
Output for 5.5.33, 5.6.18 - 5.6.19, 7.0.4, 7.0.20, 7.1.5 - 7.1.10
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: System error in /in/aToTQ on line 13 Warning: file_get_contents(https://somesite.com): failed to open stream: php_network_getaddresses: getaddrinfo failed: System error in /in/aToTQ on line 13
Output for 5.5.24 - 5.5.32, 5.5.34 - 5.5.35, 5.6.8 - 5.6.17, 5.6.20 - 5.6.28, 7.0.0 - 7.0.3, 7.0.5 - 7.0.6, 7.1.0
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/aToTQ on line 13 Warning: file_get_contents(https://somesite.com): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/aToTQ on line 13

preferences:
182.67 ms | 403 KiB | 198 Q