3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.27 ms | 1386 KiB | 21 Q