3v4l.org

run code in 500+ PHP versions simultaneously
<?php $host = 'self-signed.badssl.com'; $ip = gethostbyname($host); $f = stream_socket_client('tcp://' . $ip . ':443', $errstr, $errno, 10); stream_context_set_option($f, 'ssl', 'CN_match', $host); stream_context_set_option($f, 'ssl', 'verify_peer', true); stream_socket_enable_crypto($f, true, STREAM_CRYPTO_METHOD_TLS_CLIENT);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BRR05
function name:  (null)
number of ops:  32
compiled vars:  !0 = $host, !1 = $ip, !2 = $f, !3 = $errstr, !4 = $errno
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, 'self-signed.badssl.com'
    3     1        INIT_FCALL                                                   'gethostbyname'
          2        SEND_VAR                                                     !0
          3        DO_ICALL                                             $6      
          4        ASSIGN                                                       !1, $6
    4     5        INIT_FCALL                                                   'stream_socket_client'
          6        CONCAT                                               ~8      'tcp%3A%2F%2F', !1
          7        CONCAT                                               ~9      ~8, '%3A443'
          8        SEND_VAL                                                     ~9
          9        SEND_REF                                                     !3
         10        SEND_REF                                                     !4
         11        SEND_VAL                                                     10
         12        DO_ICALL                                             $10     
         13        ASSIGN                                                       !2, $10
    5    14        INIT_FCALL                                                   'stream_context_set_option'
         15        SEND_VAR                                                     !2
         16        SEND_VAL                                                     'ssl'
         17        SEND_VAL                                                     'CN_match'
         18        SEND_VAR                                                     !0
         19        DO_ICALL                                                     
    6    20        INIT_FCALL                                                   'stream_context_set_option'
         21        SEND_VAR                                                     !2
         22        SEND_VAL                                                     'ssl'
         23        SEND_VAL                                                     'verify_peer'
         24        SEND_VAL                                                     <true>
         25        DO_ICALL                                                     
    7    26        INIT_FCALL                                                   'stream_socket_enable_crypto'
         27        SEND_VAR                                                     !2
         28        SEND_VAL                                                     <true>
         29        SEND_VAL                                                     121
         30        DO_ICALL                                                     
         31      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
128.49 ms | 483 KiB | 11 Q