3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Handler { protected $_sp; public function __construct() { $this->_sp = fopen('wrap://lalal', 'a'); } } class Wrapper { protected $_fp; public function stream_close() { die('waa'); } public function stream_open($path, $mode) { $this->_fp = fopen('/tmp/asdf', $mode); return true; } } stream_wrapper_register('wrap', 'Wrapper'); class Manager { public static $stuff; } Manager::$stuff = new stdClass(); Manager::$stuff->Logs = new Handler;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GfajT
function name:  (null)
number of ops:  14
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   30     0  E >   INIT_FCALL                                               'stream_wrapper_register'
          1        SEND_VAL                                                 'wrap'
          2        SEND_VAL                                                 'Wrapper'
          3        DO_ICALL                                                 
   37     4        NEW                                              $2      'stdClass'
          5        DO_FCALL                                      0          
          6        ASSIGN_STATIC_PROP                                       'stuff', 'Manager'
          7        OP_DATA                                                  $2
   38     8        NEW                                              $6      'Handler'
          9        DO_FCALL                                      0          
         10        FETCH_STATIC_PROP_W          unknown             $4      'stuff'
         11        ASSIGN_OBJ                                               $4, 'Logs'
         12        OP_DATA                                                  $6
         13      > RETURN                                                   1

Class Handler:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GfajT
function name:  __construct
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'fopen'
          1        SEND_VAL                                                 'wrap%3A%2F%2Flalal'
          2        SEND_VAL                                                 'a'
          3        DO_ICALL                                         $1      
          4        ASSIGN_OBJ                                               '_sp'
          5        OP_DATA                                                  $1
   10     6      > RETURN                                                   null

End of function __construct

End of class Handler.

Class Wrapper:
Function stream_close:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/GfajT
function name:  stream_close
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E > > EXIT                                                     'waa'
   20     1*     > RETURN                                                   null

End of function stream_close

Function stream_open:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GfajT
function name:  stream_open
number of ops:  10
compiled vars:  !0 = $path, !1 = $mode
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   24     2        INIT_FCALL                                               'fopen'
          3        SEND_VAL                                                 '%2Ftmp%2Fasdf'
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $3      
          6        ASSIGN_OBJ                                               '_fp'
          7        OP_DATA                                                  $3
   26     8      > RETURN                                                   <true>
   27     9*     > RETURN                                                   null

End of function stream_open

End of class Wrapper.

Class Manager: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.93 ms | 1392 KiB | 17 Q