3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fp = fsockopen("www.gmail.com", 80); if (!$fp) { echo "Unable to open\n"; } else { fwrite($fp, "GET / HTTP/1.0\r\n\r\n"); stream_set_timeout($fp, 2); $res = fread($fp, 2000); $info = stream_get_meta_data($fp); fclose($fp); if ($info['timed_out']) { echo 'Connection timed out!'; } else { echo $res; } } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 34
Branch analysis from position: 34
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 31, Position 2 = 33
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 34
Branch analysis from position: 34
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/S3Bfd
function name:  (null)
number of ops:  35
compiled vars:  !0 = $fp, !1 = $res, !2 = $info
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   INIT_FCALL                                               'fsockopen'
          1        SEND_VAL                                                 'www.gmail.com'
          2        SEND_VAL                                                 80
          3        DO_ICALL                                         $3      
          4        ASSIGN                                                   !0, $3
    2     5        BOOL_NOT                                         ~5      !0
          6      > JMPZ                                                     ~5, ->9
    3     7    >   ECHO                                                     'Unable+to+open%0A'
          8      > JMP                                                      ->34
    6     9    >   INIT_FCALL                                               'fwrite'
         10        SEND_VAR                                                 !0
         11        SEND_VAL                                                 'GET+%2F+HTTP%2F1.0%0D%0A%0D%0A'
         12        DO_ICALL                                                 
    7    13        INIT_FCALL                                               'stream_set_timeout'
         14        SEND_VAR                                                 !0
         15        SEND_VAL                                                 2
         16        DO_ICALL                                                 
    8    17        INIT_FCALL                                               'fread'
         18        SEND_VAR                                                 !0
         19        SEND_VAL                                                 2000
         20        DO_ICALL                                         $8      
         21        ASSIGN                                                   !1, $8
   10    22        INIT_FCALL                                               'stream_get_meta_data'
         23        SEND_VAR                                                 !0
         24        DO_ICALL                                         $10     
         25        ASSIGN                                                   !2, $10
   11    26        INIT_FCALL                                               'fclose'
         27        SEND_VAR                                                 !0
         28        DO_ICALL                                                 
   13    29        FETCH_DIM_R                                      ~13     !2, 'timed_out'
         30      > JMPZ                                                     ~13, ->33
   14    31    >   ECHO                                                     'Connection+timed+out%21'
         32      > JMP                                                      ->34
   16    33    >   ECHO                                                     !1
   20    34    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.16 ms | 1396 KiB | 25 Q