3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sock = fsockopen('irc.tl', 6667); fwrite($sock, "NICK abcfds\n"); fwrite($sock, "USER abcfds 0 * :asd\n"); while(1) { while ($data = fgets($sock)) { echo nl2br($data); flush(); $w = explode(' ', $data); fwrite($sock,"JOIN #socktest\n"); if(isset($w[0])) { if($w[0] == "PING") { fwrite($sock, "PONG ".$w[1]."\n"); } } } } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 47
Branch analysis from position: 47
2 jumps found. (Code = 44) Position 1 = 48, Position 2 = 14
Branch analysis from position: 48
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 42
Branch analysis from position: 42
2 jumps found. (Code = 44) Position 1 = 47, Position 2 = 15
Branch analysis from position: 47
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 32, Position 2 = 42
Branch analysis from position: 32
2 jumps found. (Code = 43) Position 1 = 35, Position 2 = 42
Branch analysis from position: 35
2 jumps found. (Code = 44) Position 1 = 47, Position 2 = 15
Branch analysis from position: 47
Branch analysis from position: 15
Branch analysis from position: 42
Branch analysis from position: 42
filename:       /in/hPR4l
function name:  (null)
number of ops:  49
compiled vars:  !0 = $sock, !1 = $data, !2 = $w
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'fsockopen'
          1        SEND_VAL                                                 'irc.tl'
          2        SEND_VAL                                                 6667
          3        DO_ICALL                                         $3      
          4        ASSIGN                                                   !0, $3
    3     5        INIT_FCALL                                               'fwrite'
          6        SEND_VAR                                                 !0
          7        SEND_VAL                                                 'NICK+abcfds%0A'
          8        DO_ICALL                                                 
    4     9        INIT_FCALL                                               'fwrite'
         10        SEND_VAR                                                 !0
         11        SEND_VAL                                                 'USER+abcfds+0+%2A+%3Aasd%0A'
         12        DO_ICALL                                                 
    5    13      > JMP                                                      ->47
    7    14    > > JMP                                                      ->42
    8    15    >   INIT_FCALL                                               'nl2br'
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                         $7      
         18        ECHO                                                     $7
    9    19        INIT_FCALL                                               'flush'
         20        DO_ICALL                                                 
   11    21        INIT_FCALL                                               'explode'
         22        SEND_VAL                                                 '+'
         23        SEND_VAR                                                 !1
         24        DO_ICALL                                         $9      
         25        ASSIGN                                                   !2, $9
   13    26        INIT_FCALL                                               'fwrite'
         27        SEND_VAR                                                 !0
         28        SEND_VAL                                                 'JOIN+%23socktest%0A'
         29        DO_ICALL                                                 
   15    30        ISSET_ISEMPTY_DIM_OBJ                         0          !2, 0
         31      > JMPZ                                                     ~12, ->42
   16    32    >   FETCH_DIM_R                                      ~13     !2, 0
         33        IS_EQUAL                                                 ~13, 'PING'
         34      > JMPZ                                                     ~14, ->42
   17    35    >   INIT_FCALL                                               'fwrite'
         36        SEND_VAR                                                 !0
         37        FETCH_DIM_R                                      ~15     !2, 1
         38        CONCAT                                           ~16     'PONG+', ~15
         39        CONCAT                                           ~17     ~16, '%0A'
         40        SEND_VAL                                                 ~17
         41        DO_ICALL                                                 
    7    42    >   INIT_FCALL                                               'fgets'
         43        SEND_VAR                                                 !0
         44        DO_ICALL                                         $19     
         45        ASSIGN                                           ~20     !1, $19
         46      > JMPNZ                                                    ~20, ->15
    5    47    > > JMPNZ                                                    1, ->14
   22    48    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.2 ms | 1400 KiB | 25 Q