3v4l.org

run code in 300+ PHP versions simultaneously
<?php $socket = @fsockopen(gethostbyname("kubo2.wz.sk")); //if (!$socket) { // die("spojenie vypadlo"); //} $httpReq = "GET / HTTP/1.1\n"; $httpReq .= "Host: www.google.com\n"; $httpReq .= "Accept: */*\n"; $httpReq .= "Kubo2Sniffer 1.0 (+http://kubo2.wz.sk)\n\n"; fwrite($socket, $httpReq); while($line = fgets($socket) !== "\n\n") { echo $line; } fclose($socket);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 18
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 18
Branch analysis from position: 25
Branch analysis from position: 18
filename:       /in/tHDuZ
function name:  (null)
number of ops:  29
compiled vars:  !0 = $socket, !1 = $httpReq, !2 = $line
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   BEGIN_SILENCE                                    ~3      
          1        INIT_FCALL                                               'fsockopen'
          2        INIT_FCALL                                               'gethostbyname'
          3        SEND_VAL                                                 'kubo2.wz.sk'
          4        DO_ICALL                                         $4      
          5        SEND_VAR                                                 $4
          6        DO_ICALL                                         $5      
          7        END_SILENCE                                              ~3
          8        ASSIGN                                                   !0, $5
    6     9        ASSIGN                                                   !1, 'GET+%2F+HTTP%2F1.1%0A'
    7    10        ASSIGN_OP                                     8          !1, 'Host%3A+www.google.com%0A'
    8    11        ASSIGN_OP                                     8          !1, 'Accept%3A+%2A%2F%2A%0A'
    9    12        ASSIGN_OP                                     8          !1, 'Kubo2Sniffer+1.0+%28%2Bhttp%3A%2F%2Fkubo2.wz.sk%29%0A%0A'
   10    13        INIT_FCALL                                               'fwrite'
         14        SEND_VAR                                                 !0
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                                 
   11    17      > JMP                                                      ->19
   12    18    >   ECHO                                                     !2
   11    19    >   INIT_FCALL                                               'fgets'
         20        SEND_VAR                                                 !0
         21        DO_ICALL                                         $12     
         22        IS_NOT_IDENTICAL                                 ~13     $12, '%0A%0A'
         23        ASSIGN                                           ~14     !2, ~13
         24      > JMPNZ                                                    ~14, ->18
   14    25    >   INIT_FCALL                                               'fclose'
         26        SEND_VAR                                                 !0
         27        DO_ICALL                                                 
         28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.14 ms | 1396 KiB | 23 Q