3v4l.org

run code in 300+ PHP versions simultaneously
<?php class VariableStream { var $position; var $varname; function stream_open($path, $mode, $options, &$opened_path) { $url = parse_url($path); $this->varname = $url["host"]; $this->position = 0; return true; } function stream_read($count) { $ret = substr(gzinflate($GLOBALS[$this->varname]), $this->position, $count); $this->position += strlen($ret); return $ret; } function stream_eof() { return true; } function stream_stat() { return array(); //return stat(__FILE__); } } stream_wrapper_register("var", "VariableStream"); $myvar = gzdeflate("<?php echo 123;"); include("var://myvar");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CZVsS
function name:  (null)
number of ops:  10
compiled vars:  !0 = $myvar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   34     0  E >   INIT_FCALL                                               'stream_wrapper_register'
          1        SEND_VAL                                                 'var'
          2        SEND_VAL                                                 'VariableStream'
          3        DO_ICALL                                                 
   36     4        INIT_FCALL                                               'gzdeflate'
          5        SEND_VAL                                                 '%3C%3Fphp+echo+123%3B'
          6        DO_ICALL                                         $2      
          7        ASSIGN                                                   !0, $2
   38     8        INCLUDE_OR_EVAL                                          'var%3A%2F%2Fmyvar', INCLUDE
          9      > RETURN                                                   1

Class VariableStream:
Function stream_open:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CZVsS
function name:  stream_open
number of ops:  15
compiled vars:  !0 = $path, !1 = $mode, !2 = $options, !3 = $opened_path, !4 = $url
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
    9     4        INIT_FCALL                                               'parse_url'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $5      
          7        ASSIGN                                                   !4, $5
   10     8        FETCH_DIM_R                                      ~8      !4, 'host'
          9        ASSIGN_OBJ                                               'varname'
         10        OP_DATA                                                  ~8
   11    11        ASSIGN_OBJ                                               'position'
         12        OP_DATA                                                  0
   13    13      > RETURN                                                   <true>
   14    14*     > RETURN                                                   null

End of function stream_open

Function stream_read:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CZVsS
function name:  stream_read
number of ops:  19
compiled vars:  !0 = $count, !1 = $ret
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV                                             !0      
   18     1        INIT_FCALL                                               'substr'
          2        INIT_FCALL                                               'gzinflate'
          3        FETCH_OBJ_R                                      ~3      'varname'
          4        FETCH_R                      global              ~2      'GLOBALS'
          5        FETCH_DIM_R                                      ~4      ~2, ~3
          6        SEND_VAL                                                 ~4
          7        DO_ICALL                                         $5      
          8        SEND_VAR                                                 $5
          9        FETCH_OBJ_R                                      ~6      'position'
         10        SEND_VAL                                                 ~6
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $7      
         13        ASSIGN                                                   !1, $7
   19    14        STRLEN                                           ~10     !1
         15        ASSIGN_OBJ_OP                                 1          'position'
         16        OP_DATA                                                  ~10
   20    17      > RETURN                                                   !1
   21    18*     > RETURN                                                   null

End of function stream_read

Function stream_eof:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CZVsS
function name:  stream_eof
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E > > RETURN                                                   <true>
   26     1*     > RETURN                                                   null

End of function stream_eof

Function stream_stat:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CZVsS
function name:  stream_stat
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   30     0  E > > RETURN                                                   <array>
   31     1*     > RETURN                                                   null

End of function stream_stat

End of class VariableStream.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.28 ms | 1400 KiB | 23 Q