3v4l.org

run code in 300+ PHP versions simultaneously
<?php $f = fopen("data1.txt",'r+') or die("Error"); //echo fread($f, 5); //echo fread($f, 3); $s = filesize("data1.txt"); echo fread($f, $s); fwrite($f,'ksdhfkjsdf'); echo fread($f, $s+10); file_put_contents("data1.txt",'\n1234567890',FILE_APPEND); echo fread($f, $s+30); fclose($f); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vg7DK
function name:  (null)
number of ops:  42
compiled vars:  !0 = $f, !1 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'fopen'
          1        SEND_VAL                                                 'data1.txt'
          2        SEND_VAL                                                 'r%2B'
          3        DO_ICALL                                         $2      
          4        ASSIGN                                           ~3      !0, $2
          5      > JMPNZ_EX                                         ~3      ~3, ->8
          6    > > EXIT                                                     'Error'
          7*       BOOL                                             ~3      <true>
    5     8    >   INIT_FCALL                                               'filesize'
          9        SEND_VAL                                                 'data1.txt'
         10        DO_ICALL                                         $4      
         11        ASSIGN                                                   !1, $4
    6    12        INIT_FCALL                                               'fread'
         13        SEND_VAR                                                 !0
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                         $6      
         16        ECHO                                                     $6
    7    17        INIT_FCALL                                               'fwrite'
         18        SEND_VAR                                                 !0
         19        SEND_VAL                                                 'ksdhfkjsdf'
         20        DO_ICALL                                                 
    8    21        INIT_FCALL                                               'fread'
         22        SEND_VAR                                                 !0
         23        ADD                                              ~8      !1, 10
         24        SEND_VAL                                                 ~8
         25        DO_ICALL                                         $9      
         26        ECHO                                                     $9
    9    27        INIT_FCALL                                               'file_put_contents'
         28        SEND_VAL                                                 'data1.txt'
         29        SEND_VAL                                                 '%5Cn1234567890'
         30        SEND_VAL                                                 8
         31        DO_ICALL                                                 
   10    32        INIT_FCALL                                               'fread'
         33        SEND_VAR                                                 !0
         34        ADD                                              ~11     !1, 30
         35        SEND_VAL                                                 ~11
         36        DO_ICALL                                         $12     
         37        ECHO                                                     $12
   11    38        INIT_FCALL                                               'fclose'
         39        SEND_VAR                                                 !0
         40        DO_ICALL                                                 
   12    41      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.11 ms | 1396 KiB | 25 Q