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 = 17
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 16
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 16
Branch analysis from position: 23
Branch analysis from position: 16
filename:       /in/Th3st
function name:  (null)
number of ops:  27
compiled vars:  !0 = $socket, !1 = $httpReq, !2 = $line
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'fsockopen'
          1        INIT_FCALL                                               'gethostbyname'
          2        SEND_VAL                                                 'kubo2.wz.sk'
          3        DO_ICALL                                         $3      
          4        SEND_VAR                                                 $3
          5        DO_ICALL                                         $4      
          6        ASSIGN                                                   !0, $4
    6     7        ASSIGN                                                   !1, 'GET+%2F+HTTP%2F1.1%0A'
    7     8        ASSIGN_OP                                     8          !1, 'Host%3A+www.google.com%0A'
    8     9        ASSIGN_OP                                     8          !1, 'Accept%3A+%2A%2F%2A%0A'
    9    10        ASSIGN_OP                                     8          !1, 'Kubo2Sniffer+1.0+%28%2Bhttp%3A%2F%2Fkubo2.wz.sk%29%0A%0A'
   10    11        INIT_FCALL                                               'fwrite'
         12        SEND_VAR                                                 !0
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                                 
   11    15      > JMP                                                      ->17
   12    16    >   ECHO                                                     !2
   11    17    >   INIT_FCALL                                               'fgets'
         18        SEND_VAR                                                 !0
         19        DO_ICALL                                         $11     
         20        IS_NOT_IDENTICAL                                 ~12     $11, '%0A%0A'
         21        ASSIGN                                           ~13     !2, ~12
         22      > JMPNZ                                                    ~13, ->16
   14    23    >   INIT_FCALL                                               'fclose'
         24        SEND_VAR                                                 !0
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.03 ms | 1396 KiB | 23 Q