3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_STRICT | E_ALL); class y { public function __get($k) { } } class x extends y { protected $_x = array(); public function &__get($k) { return $this->_x; } } $x =new x; $x->a['b'] = 4; print_r($x);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/d3TcF
function name:  (null)
number of ops:  13
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 32767
          2        DO_ICALL                                                 
   15     3        NEW                                              $2      'x'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $2
   16     6        FETCH_OBJ_W                                      $5      !0, 'a'
          7        ASSIGN_DIM                                               $5, 'b'
          8        OP_DATA                                                  4
   17     9        INIT_FCALL                                               'print_r'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Class y:
Function __get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/d3TcF
function name:  __get
number of ops:  2
compiled vars:  !0 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1      > RETURN                                                   null

End of function __get

End of class y.

Class x:
Function __get:
Finding entry points
Branch analysis from position: 0
Return found
filename:       /in/d3TcF
function name:  __get
number of ops:  4
compiled vars:  !0 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   11     1        FETCH_OBJ_W                                      $1      '_x'
          2      > RETURN_BY_REF                                            $1
   12     3*     > RETURN_BY_REF                                            null

End of function __get

End of class x.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.31 ms | 1395 KiB | 17 Q