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' ]]); $timeout = 42; $connFlags = STREAM_CLIENT_CONNECT; // Works as before $sock = stream_socket_client('tls://best-free-games.eu:443', $errno, $errstr, $timeout, $connFlags, $context); // Negotiates SSLv3, TLSv1.1 or TLSv1.2 because tls:// default is overridden by the context $context = stream_context_create(['ssl' => [ 'crypto_method' => STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT | STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT | STREAM_CRYPTO_METHOD_SSLv3_CLIENT ]]); $sock = stream_socket_client('tls://github.com:443', $errno, $errstr, $timeout, $connFlags, $context);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rnkB5
function name:  (null)
number of ops:  41
compiled vars:  !0 = $ciphers, !1 = $ciphers_and_aliases, !2 = $cipher_aliases, !3 = $context, !4 = $timeout, !5 = $connFlags, !6 = $sock, !7 = $errno, !8 = $errstr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL_BY_NAME                                       'openssl_get_cipher_methods'
          1        DO_FCALL                                      0  $9      
          2        ASSIGN                                                   !0, $9
    4     3        INIT_FCALL_BY_NAME                                       'openssl_get_cipher_methods'
          4        SEND_VAL_EX                                              <true>
          5        DO_FCALL                                      0  $11     
          6        ASSIGN                                                   !1, $11
    5     7        INIT_FCALL                                               'array_diff'
          8        SEND_VAR                                                 !1
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $13     
         11        ASSIGN                                                   !2, $13
   10    12        INIT_FCALL                                               'stream_context_create'
   11    13        SEND_VAL                                                 <array>
         14        DO_ICALL                                         $15     
   10    15        ASSIGN                                                   !3, $15
   13    16        ASSIGN                                                   !4, 42
   14    17        ASSIGN                                                   !5, 4
   17    18        INIT_FCALL                                               'stream_socket_client'
         19        SEND_VAL                                                 'tls%3A%2F%2Fbest-free-games.eu%3A443'
         20        SEND_REF                                                 !7
         21        SEND_REF                                                 !8
         22        SEND_VAR                                                 !4
         23        SEND_VAR                                                 !5
         24        SEND_VAR                                                 !3
         25        DO_ICALL                                         $19     
         26        ASSIGN                                                   !6, $19
   20    27        INIT_FCALL                                               'stream_context_create'
   21    28        SEND_VAL                                                 <array>
         29        DO_ICALL                                         $21     
   20    30        ASSIGN                                                   !3, $21
   23    31        INIT_FCALL                                               'stream_socket_client'
         32        SEND_VAL                                                 'tls%3A%2F%2Fgithub.com%3A443'
         33        SEND_REF                                                 !7
         34        SEND_REF                                                 !8
         35        SEND_VAR                                                 !4
         36        SEND_VAR                                                 !5
         37        SEND_VAR                                                 !3
         38        DO_ICALL                                         $23     
         39        ASSIGN                                                   !6, $23
         40      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
187.42 ms | 1396 KiB | 19 Q