3v4l.org

run code in 300+ PHP versions simultaneously
<?php $server = stream_socket_server('tcp://127.0.0.1:8080'); $context = stream_context_create(array('socket'=>array('bindto'=>'1.2.3.4:5678'))); $client = stream_socket_client('tcp://127.0.0.1:8080', $errno, $errstr, 10, STREAM_CLIENT_CONNECT, $context); var_dump($client); var_dump(stream_socket_get_name($client, false));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GkN7F
function name:  (null)
number of ops:  28
compiled vars:  !0 = $server, !1 = $context, !2 = $client, !3 = $errno, !4 = $errstr
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   INIT_FCALL                                               'stream_socket_server'
         1        SEND_VAL                                                 'tcp%3A%2F%2F127.0.0.1%3A8080'
         2        DO_ICALL                                         $5      
         3        ASSIGN                                                   !0, $5
   5     4        INIT_FCALL                                               'stream_context_create'
         5        SEND_VAL                                                 <array>
         6        DO_ICALL                                         $7      
         7        ASSIGN                                                   !1, $7
   6     8        INIT_FCALL                                               'stream_socket_client'
         9        SEND_VAL                                                 'tcp%3A%2F%2F127.0.0.1%3A8080'
        10        SEND_REF                                                 !3
        11        SEND_REF                                                 !4
        12        SEND_VAL                                                 10
        13        SEND_VAL                                                 4
        14        SEND_VAR                                                 !1
        15        DO_ICALL                                         $9      
        16        ASSIGN                                                   !2, $9
   8    17        INIT_FCALL                                               'var_dump'
        18        SEND_VAR                                                 !2
        19        DO_ICALL                                                 
   9    20        INIT_FCALL                                               'var_dump'
        21        INIT_FCALL                                               'stream_socket_get_name'
        22        SEND_VAR                                                 !2
        23        SEND_VAL                                                 <false>
        24        DO_ICALL                                         $12     
        25        SEND_VAR                                                 $12
        26        DO_ICALL                                                 
        27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
17.93 ms | 462 KiB | 7 Q