3v4l.org

run code in 300+ PHP versions simultaneously
<?php ini_set('default_socket_timeout', -1); $fp = stream_socket_client("http://echo.websocket.org", $errno, $errstr, 30); if (!$fp) { echo "$errstr ($errno)<br />\n"; } else { fwrite($fp, "GET / HTTP/1.0\r\nHost: www.example.com\r\nAccept: */*\r\n\r\n"); while (!feof($fp)) { echo fgets($fp, 1024); } fclose($fp); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 19
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 37
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
2 jumps found. (Code = 44) Position 1 = 34, Position 2 = 24
Branch analysis from position: 34
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
2 jumps found. (Code = 44) Position 1 = 34, Position 2 = 24
Branch analysis from position: 34
Branch analysis from position: 24
filename:       /in/dgb2d
function name:  (null)
number of ops:  38
compiled vars:  !0 = $fp, !1 = $errno, !2 = $errstr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'ini_set'
          1        SEND_VAL                                                 'default_socket_timeout'
          2        SEND_VAL                                                 -1
          3        DO_ICALL                                                 
    5     4        INIT_FCALL                                               'stream_socket_client'
          5        SEND_VAL                                                 'http%3A%2F%2Fecho.websocket.org'
          6        SEND_REF                                                 !1
          7        SEND_REF                                                 !2
          8        SEND_VAL                                                 30
          9        DO_ICALL                                         $4      
         10        ASSIGN                                                   !0, $4
    6    11        BOOL_NOT                                         ~6      !0
         12      > JMPZ                                                     ~6, ->19
    7    13    >   ROPE_INIT                                     4  ~8      !2
         14        ROPE_ADD                                      1  ~8      ~8, '+%28'
         15        ROPE_ADD                                      2  ~8      ~8, !1
         16        ROPE_END                                      3  ~7      ~8, '%29%3Cbr+%2F%3E%0A'
         17        ECHO                                                     ~7
         18      > JMP                                                      ->37
    9    19    >   INIT_FCALL                                               'fwrite'
         20        SEND_VAR                                                 !0
         21        SEND_VAL                                                 'GET+%2F+HTTP%2F1.0%0D%0AHost%3A+www.example.com%0D%0AAccept%3A+%2A%2F%2A%0D%0A%0D%0A'
         22        DO_ICALL                                                 
   10    23      > JMP                                                      ->29
   11    24    >   INIT_FCALL                                               'fgets'
         25        SEND_VAR                                                 !0
         26        SEND_VAL                                                 1024
         27        DO_ICALL                                         $11     
         28        ECHO                                                     $11
   10    29    >   INIT_FCALL                                               'feof'
         30        SEND_VAR                                                 !0
         31        DO_ICALL                                         $12     
         32        BOOL_NOT                                         ~13     $12
         33      > JMPNZ                                                    ~13, ->24
   13    34    >   INIT_FCALL                                               'fclose'
         35        SEND_VAR                                                 !0
         36        DO_ICALL                                                 
   14    37    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.25 ms | 1400 KiB | 25 Q