3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* * __get() magic method and assign by reference * * @link https://stackoverflow.com/a/74525435/367456 */ class T extends stdClass { public function __get($name) { $x = null; return $x; } } $t = new T(); $t->prop2 = &$x1;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5bcXf
function name:  (null)
number of ops:  6
compiled vars:  !0 = $t, !1 = $x1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   NEW                                              $2      'T'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   19     3        ASSIGN_OBJ_REF                                           !0, 'prop2'
          4        OP_DATA                                                  !1
   20     5      > RETURN                                                   1

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

End of function __get

End of class T.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
240.22 ms | 1009 KiB | 13 Q