3v4l.org

run code in 300+ PHP versions simultaneously
<?php $socket = @fsockopen(gethostbyname("www.google.com"), 80); 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
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 13
Branch analysis from position: 12
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 22
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 22
Branch analysis from position: 29
Branch analysis from position: 22
filename:       /in/X4U7n
function name:  (null)
number of ops:  33
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                                                 'www.google.com'
          4        DO_ICALL                                         $4      
          5        SEND_VAR                                                 $4
          6        SEND_VAL                                                 80
          7        DO_ICALL                                         $5      
          8        END_SILENCE                                              ~3
          9        ASSIGN                                                   !0, $5
    3    10        BOOL_NOT                                         ~7      !0
         11      > JMPZ                                                     ~7, ->13
    4    12    > > EXIT                                                     'spojenie+vypadlo'
    6    13    >   ASSIGN                                                   !1, 'GET+%2F+HTTP%2F1.1%0A'
    7    14        ASSIGN_OP                                     8          !1, 'Host%3A+www.google.com%0A'
    8    15        ASSIGN_OP                                     8          !1, 'Accept%3A+%2A%2F%2A%0A'
    9    16        ASSIGN_OP                                     8          !1, 'Kubo2Sniffer+1.0+%28%2Bhttp%3A%2F%2Fkubo2.wz.sk%29%0A%0A'
   10    17        INIT_FCALL                                               'fwrite'
         18        SEND_VAR                                                 !0
         19        SEND_VAR                                                 !1
         20        DO_ICALL                                                 
   11    21      > JMP                                                      ->23
   12    22    >   ECHO                                                     !2
   11    23    >   INIT_FCALL                                               'fgets'
         24        SEND_VAR                                                 !0
         25        DO_ICALL                                         $13     
         26        IS_NOT_IDENTICAL                                 ~14     $13, '%0A%0A'
         27        ASSIGN                                           ~15     !2, ~14
         28      > JMPNZ                                                    ~15, ->22
   14    29    >   INIT_FCALL                                               'fclose'
         30        SEND_VAR                                                 !0
         31        DO_ICALL                                                 
         32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.28 ms | 1400 KiB | 24 Q