3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a { public function __constructor() { $that = & $this; $that = new b(); } } class b { } $class = new a(); var_dump(get_class($class));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cmnGR
function name:  (null)
number of ops:  8
compiled vars:  !0 = $class
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   NEW                                              $1      'a'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   19     3        INIT_FCALL                                               'var_dump'
          4        GET_CLASS                                        ~4      !0
          5        SEND_VAL                                                 ~4
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Class a:
Function __constructor:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cmnGR
function name:  __constructor
number of ops:  6
compiled vars:  !0 = $that
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   FETCH_THIS                                       $1      
          1        ASSIGN_REF                                               !0, $1
    8     2        NEW                                              $3      'b'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $3
    9     5      > RETURN                                                   null

End of function __constructor

End of class a.

Class b: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.48 ms | 1394 KiB | 15 Q