3v4l.org

run code in 300+ PHP versions simultaneously
<?php function Store($ipAddress){ global $return; $return="success"; if(is_writable("./tracker/addresses.txt")) { //Skriver datan till filen $myFile = "./tracker/addresses.txt"; $fh = fopen($myFile, 'a') or die("can't open file"); $stringData = $ipAddress; fwrite($fh, $stringData . "\n"); fclose($fh); } else { //File not writeable $return="error"; } //return is used for javascript handling later on - nothing related } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rgiiv
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E > > RETURN                                                   1

Function store:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 26
Branch analysis from position: 7
2 jumps found. (Code = 47) Position 1 = 14, Position 2 = 16
Branch analysis from position: 14
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rgiiv
function name:  Store
number of ops:  28
compiled vars:  !0 = $ipAddress, !1 = $return, !2 = $myFile, !3 = $fh, !4 = $stringData
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        BIND_GLOBAL                                              !1, 'return'
    4     2        ASSIGN                                                   !1, 'success'
    6     3        INIT_FCALL                                               'is_writable'
          4        SEND_VAL                                                 '.%2Ftracker%2Faddresses.txt'
          5        DO_ICALL                                         $6      
          6      > JMPZ                                                     $6, ->26
    8     7    >   ASSIGN                                                   !2, '.%2Ftracker%2Faddresses.txt'
    9     8        INIT_FCALL                                               'fopen'
          9        SEND_VAR                                                 !2
         10        SEND_VAL                                                 'a'
         11        DO_ICALL                                         $8      
         12        ASSIGN                                           ~9      !3, $8
         13      > JMPNZ_EX                                         ~9      ~9, ->16
         14    > > EXIT                                                     'can%27t+open+file'
         15*       BOOL                                             ~9      <true>
   10    16    >   ASSIGN                                                   !4, !0
   11    17        INIT_FCALL                                               'fwrite'
         18        SEND_VAR                                                 !3
         19        CONCAT                                           ~11     !4, '%0A'
         20        SEND_VAL                                                 ~11
         21        DO_ICALL                                                 
   12    22        INIT_FCALL                                               'fclose'
         23        SEND_VAR                                                 !3
         24        DO_ICALL                                                 
         25      > JMP                                                      ->27
   15    26    >   ASSIGN                                                   !1, 'error'
   19    27    > > RETURN                                                   null

End of function store

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.21 ms | 1401 KiB | 21 Q