3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a { } class b { public function __get($name) { // Do nothing } } class c extends b { public function __set($name, $value) { parent::__set($name, $value);}} // Works $a = new a; $x = new StdClass(); $a->test =& $x; // Fatal error: Cannot assign by reference to overloaded object on line 21 $b = new c; $y = new StdClass(); $b->test = $y;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/o6SMg
function name:  (null)
number of ops:  17
compiled vars:  !0 = $a, !1 = $x, !2 = $b, !3 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   NEW                                              $4      'a'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
   26     3        NEW                                              $7      'StdClass'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $7
   27     6        ASSIGN_OBJ_REF                                           !0, 'test'
          7        OP_DATA                                                  !1
   30     8        NEW                                              $11     'c'
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !2, $11
   31    11        NEW                                              $14     'StdClass'
         12        DO_FCALL                                      0          
         13        ASSIGN                                                   !3, $14
   32    14        ASSIGN_OBJ                                               !2, 'test'
         15        OP_DATA                                                  !3
         16      > RETURN                                                   1

Class a: [no user functions]
Class b:
Function __get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/o6SMg
function name:  __get
number of ops:  2
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   12     1      > RETURN                                                   null

End of function __get

End of class b.

Class c:
Function __set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/o6SMg
function name:  __set
number of ops:  7
compiled vars:  !0 = $name, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   22     2        INIT_STATIC_METHOD_CALL                                  '__set'
          3        SEND_VAR_EX                                              !0
          4        SEND_VAR_EX                                              !1
          5        DO_FCALL                                      0          
          6      > RETURN                                                   null

End of function __set

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

End of function __get

End of class c.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.05 ms | 1395 KiB | 13 Q