3v4l.org

run code in 500+ PHP versions simultaneously
<?php $server = stream_socket_server('0:8080'); //passthru('ls -la ' . escapeshellarg('/proc/' . getmypid() . '/fd')); $fd = 3; $handle = fopen('php://fd/' . $fd, 'r+'); var_dump( stream_socket_get_name($handle, false), stream_get_meta_data($handle) ); $client = stream_socket_accept($handle, 0);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PWjMH
function name:  (null)
number of ops:  28
compiled vars:  !0 = $server, !1 = $fd, !2 = $handle, !3 = $client
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                                   'stream_socket_server'
          1        SEND_VAL                                                     '0%3A8080'
          2        DO_ICALL                                             $4      
          3        ASSIGN                                                       !0, $4
    6     4        ASSIGN                                                       !1, 3
    8     5        INIT_FCALL                                                   'fopen'
          6        CONCAT                                               ~7      'php%3A%2F%2Ffd%2F', !1
          7        SEND_VAL                                                     ~7
          8        SEND_VAL                                                     'r%2B'
          9        DO_ICALL                                             $8      
         10        ASSIGN                                                       !2, $8
    9    11        INIT_FCALL                                                   'var_dump'
   10    12        INIT_FCALL                                                   'stream_socket_get_name'
         13        SEND_VAR                                                     !2
         14        SEND_VAL                                                     <false>
         15        DO_ICALL                                             $10     
         16        SEND_VAR                                                     $10
   11    17        INIT_FCALL                                                   'stream_get_meta_data'
         18        SEND_VAR                                                     !2
         19        DO_ICALL                                             $11     
         20        SEND_VAR                                                     $11
    9    21        DO_ICALL                                                     
   14    22        INIT_FCALL                                                   'stream_socket_accept'
         23        SEND_VAR                                                     !2
         24        SEND_VAL                                                     0
         25        DO_ICALL                                             $13     
         26        ASSIGN                                                       !3, $13
         27      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
130.02 ms | 483 KiB | 13 Q