3v4l.org

run code in 300+ PHP versions simultaneously
<?php $file = '/tmp/file.txt'; file_put_contents($file, '<?php return 1;'); $var = include $file; file_put_contents($file, '<?php return 2;'); $var = include $file; var_dump($var);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0FsvF
function name:  (null)
number of ops:  17
compiled vars:  !0 = $file, !1 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%2Ftmp%2Ffile.txt'
    3     1        INIT_FCALL                                               'file_put_contents'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 '%3C%3Fphp+return+1%3B'
          4        DO_ICALL                                                 
    4     5        INCLUDE_OR_EVAL                                  $4      !0, INCLUDE
          6        ASSIGN                                                   !1, $4
    5     7        INIT_FCALL                                               'file_put_contents'
          8        SEND_VAR                                                 !0
          9        SEND_VAL                                                 '%3C%3Fphp+return+2%3B'
         10        DO_ICALL                                                 
    6    11        INCLUDE_OR_EVAL                                  $7      !0, INCLUDE
         12        ASSIGN                                                   !1, $7
    7    13        INIT_FCALL                                               'var_dump'
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.87 ms | 1394 KiB | 17 Q