3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a { } class b { public function __get($name) { // Do nothing } } // Works $a = new a; $x = new StdClass(); $a->test =& $x; // Fatal error: Cannot assign by reference to overloaded object on line 21 $b = new b; $y = new StdClass(); $b->test =& $y;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iDKt1
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
-------------------------------------------------------------------------------------
   16     0  E >   NEW                                              $4      'a'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
   17     3        NEW                                              $7      'StdClass'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $7
   18     6        ASSIGN_OBJ_REF                                           !0, 'test'
          7        OP_DATA                                                  !1
   21     8        NEW                                              $11     'b'
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !2, $11
   22    11        NEW                                              $14     'StdClass'
         12        DO_FCALL                                      0          
         13        ASSIGN                                                   !3, $14
   23    14        ASSIGN_OBJ_REF                                           !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/iDKt1
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.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.9 ms | 1394 KiB | 13 Q