3v4l.org

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

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

End of function __get

End of class stdClass@anonymous.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
220.51 ms | 1009 KiB | 13 Q