3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fh = fopen('test.txt', 'a'); var_dump(fgets($fh)); var_dump(file_get_contents('test.txt')); fclose($fh);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Cccvp
function name:  (null)
number of ops:  21
compiled vars:  !0 = $fh
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'fopen'
          1        SEND_VAL                                                 'test.txt'
          2        SEND_VAL                                                 'a'
          3        DO_ICALL                                         $1      
          4        ASSIGN                                                   !0, $1
    5     5        INIT_FCALL                                               'var_dump'
          6        INIT_FCALL                                               'fgets'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $3      
          9        SEND_VAR                                                 $3
         10        DO_ICALL                                                 
    6    11        INIT_FCALL                                               'var_dump'
         12        INIT_FCALL                                               'file_get_contents'
         13        SEND_VAL                                                 'test.txt'
         14        DO_ICALL                                         $5      
         15        SEND_VAR                                                 $5
         16        DO_ICALL                                                 
    8    17        INIT_FCALL                                               'fclose'
         18        SEND_VAR                                                 !0
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.88 ms | 1395 KiB | 23 Q