3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fh = fopen('php://temp', 'w+'); fwrite($fh, '123'); var_dump(ftell($fh)); stream_filter_append($fh, 'zlib.deflate', STREAM_FILTER_WRITE, 9); fwrite($fh, 'abc'); var_dump(ftell($fh)); fseek($fh, 0); var_dump(fread($fh, 1024)); fclose($fh);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VAfmR
function name:  (null)
number of ops:  46
compiled vars:  !0 = $fh
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'fopen'
          1        SEND_VAL                                                 'php%3A%2F%2Ftemp'
          2        SEND_VAL                                                 'w%2B'
          3        DO_ICALL                                         $1      
          4        ASSIGN                                                   !0, $1
    5     5        INIT_FCALL                                               'fwrite'
          6        SEND_VAR                                                 !0
          7        SEND_VAL                                                 '123'
          8        DO_ICALL                                                 
    6     9        INIT_FCALL                                               'var_dump'
         10        INIT_FCALL                                               'ftell'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $4      
         13        SEND_VAR                                                 $4
         14        DO_ICALL                                                 
    8    15        INIT_FCALL                                               'stream_filter_append'
         16        SEND_VAR                                                 !0
         17        SEND_VAL                                                 'zlib.deflate'
         18        SEND_VAL                                                 2
         19        SEND_VAL                                                 9
         20        DO_ICALL                                                 
   10    21        INIT_FCALL                                               'fwrite'
         22        SEND_VAR                                                 !0
         23        SEND_VAL                                                 'abc'
         24        DO_ICALL                                                 
   12    25        INIT_FCALL                                               'var_dump'
         26        INIT_FCALL                                               'ftell'
         27        SEND_VAR                                                 !0
         28        DO_ICALL                                         $8      
         29        SEND_VAR                                                 $8
         30        DO_ICALL                                                 
   14    31        INIT_FCALL                                               'fseek'
         32        SEND_VAR                                                 !0
         33        SEND_VAL                                                 0
         34        DO_ICALL                                                 
   15    35        INIT_FCALL                                               'var_dump'
         36        INIT_FCALL                                               'fread'
         37        SEND_VAR                                                 !0
         38        SEND_VAL                                                 1024
         39        DO_ICALL                                         $11     
         40        SEND_VAR                                                 $11
         41        DO_ICALL                                                 
   17    42        INIT_FCALL                                               'fclose'
         43        SEND_VAR                                                 !0
         44        DO_ICALL                                                 
         45      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.74 ms | 1400 KiB | 29 Q