3v4l.org

run code in 300+ PHP versions simultaneously
<?php $content = file_get_contents(__FILE__); $h = fopen('php://temp', 'r+b'); fwrite($h, $content); rewind($h); $h2 = fopen('php://temp', 'r+b'); fwrite($h2, 'Nenenenenenenen'); rewind($h2); var_dump(fread($h, 20)); var_dump(fread($h2, 20));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DX7sd
function name:  (null)
number of ops:  43
compiled vars:  !0 = $content, !1 = $h, !2 = $h2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'file_get_contents'
          1        SEND_VAL                                                 '%2Fin%2FDX7sd'
          2        DO_ICALL                                         $3      
          3        ASSIGN                                                   !0, $3
    5     4        INIT_FCALL                                               'fopen'
          5        SEND_VAL                                                 'php%3A%2F%2Ftemp'
          6        SEND_VAL                                                 'r%2Bb'
          7        DO_ICALL                                         $5      
          8        ASSIGN                                                   !1, $5
    6     9        INIT_FCALL                                               'fwrite'
         10        SEND_VAR                                                 !1
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                                 
    7    13        INIT_FCALL                                               'rewind'
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                                 
   11    16        INIT_FCALL                                               'fopen'
         17        SEND_VAL                                                 'php%3A%2F%2Ftemp'
         18        SEND_VAL                                                 'r%2Bb'
         19        DO_ICALL                                         $9      
         20        ASSIGN                                                   !2, $9
   12    21        INIT_FCALL                                               'fwrite'
         22        SEND_VAR                                                 !2
         23        SEND_VAL                                                 'Nenenenenenenen'
         24        DO_ICALL                                                 
   13    25        INIT_FCALL                                               'rewind'
         26        SEND_VAR                                                 !2
         27        DO_ICALL                                                 
   15    28        INIT_FCALL                                               'var_dump'
         29        INIT_FCALL                                               'fread'
         30        SEND_VAR                                                 !1
         31        SEND_VAL                                                 20
         32        DO_ICALL                                         $13     
         33        SEND_VAR                                                 $13
         34        DO_ICALL                                                 
   16    35        INIT_FCALL                                               'var_dump'
         36        INIT_FCALL                                               'fread'
         37        SEND_VAR                                                 !2
         38        SEND_VAL                                                 20
         39        DO_ICALL                                         $15     
         40        SEND_VAR                                                 $15
         41        DO_ICALL                                                 
         42      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
131.73 ms | 1401 KiB | 25 Q