3v4l.org

run code in 300+ PHP versions simultaneously
<?php function bartz_online($ip, $port){ $fs=@fsockopen($ip, $port, $ERROR_NO, $ERROR_STR, 3); $pck=pack("vCi",7,0x00,-3); fwrite($fs,$pck); $r=fread($fs,73); fclose($fs); $a=unpack("vsize/Cid/iworld/imax/icurrent/iplaying/istore",$r); return $a; } function print_online($ip, $port, $name){ $a = bartz_online($ip, $port); printf("ServerName: %s - Current: %d - Store: %d - Max %d\n", $name, $a['playing'], $a['store'], $a['max']); } print_online('185.30.164.11','7777','L2-Toxic'); //$fp = fopen('online.txt', 'a'); //fwrite($fp, bartz_online()); //fclose($fp); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HDTUa
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   INIT_FCALL                                               'print_online'
          1        SEND_VAL                                                 '185.30.164.11'
          2        SEND_VAL                                                 '7777'
          3        SEND_VAL                                                 'L2-Toxic'
          4        DO_FCALL                                      0          
   23     5      > RETURN                                                   1

Function bartz_online:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HDTUa
function name:  bartz_online
number of ops:  38
compiled vars:  !0 = $ip, !1 = $port, !2 = $fs, !3 = $ERROR_NO, !4 = $ERROR_STR, !5 = $pck, !6 = $r, !7 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        BEGIN_SILENCE                                    ~8      
          3        INIT_FCALL                                               'fsockopen'
          4        SEND_VAR                                                 !0
          5        SEND_VAR                                                 !1
          6        SEND_REF                                                 !3
          7        SEND_REF                                                 !4
          8        SEND_VAL                                                 3
          9        DO_ICALL                                         $9      
         10        END_SILENCE                                              ~8
         11        ASSIGN                                                   !2, $9
    5    12        INIT_FCALL                                               'pack'
         13        SEND_VAL                                                 'vCi'
         14        SEND_VAL                                                 7
         15        SEND_VAL                                                 0
         16        SEND_VAL                                                 -3
         17        DO_ICALL                                         $11     
         18        ASSIGN                                                   !5, $11
    6    19        INIT_FCALL                                               'fwrite'
         20        SEND_VAR                                                 !2
         21        SEND_VAR                                                 !5
         22        DO_ICALL                                                 
    7    23        INIT_FCALL                                               'fread'
         24        SEND_VAR                                                 !2
         25        SEND_VAL                                                 73
         26        DO_ICALL                                         $14     
         27        ASSIGN                                                   !6, $14
    8    28        INIT_FCALL                                               'fclose'
         29        SEND_VAR                                                 !2
         30        DO_ICALL                                                 
    9    31        INIT_FCALL                                               'unpack'
         32        SEND_VAL                                                 'vsize%2FCid%2Fiworld%2Fimax%2Ficurrent%2Fiplaying%2Fistore'
         33        SEND_VAR                                                 !6
         34        DO_ICALL                                         $17     
         35        ASSIGN                                                   !7, $17
   10    36      > RETURN                                                   !7
   11    37*     > RETURN                                                   null

End of function bartz_online

Function print_online:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HDTUa
function name:  print_online
number of ops:  19
compiled vars:  !0 = $ip, !1 = $port, !2 = $name, !3 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
   15     3        INIT_FCALL                                               'bartz_online'
          4        SEND_VAR                                                 !0
          5        SEND_VAR                                                 !1
          6        DO_FCALL                                      0  $4      
          7        ASSIGN                                                   !3, $4
   16     8        INIT_FCALL                                               'printf'
          9        SEND_VAL                                                 'ServerName%3A+%25s+-+Current%3A+%25d+-+Store%3A+%25d+-+Max+%25d%0A'
         10        SEND_VAR                                                 !2
         11        FETCH_DIM_R                                      ~6      !3, 'playing'
         12        SEND_VAL                                                 ~6
         13        FETCH_DIM_R                                      ~7      !3, 'store'
         14        SEND_VAL                                                 ~7
         15        FETCH_DIM_R                                      ~8      !3, 'max'
         16        SEND_VAL                                                 ~8
         17        DO_ICALL                                                 
   17    18      > RETURN                                                   null

End of function print_online

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.98 ms | 1403 KiB | 29 Q