3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a { function __construct() { $a = $GLOBALS['a']; var_dump($a); } } class b {} $a = new a(new b);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BjHUH
function name:  (null)
number of ops:  7
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $1      'a'
          1        NEW                                              $2      'b'
          2        DO_FCALL                                      0          
          3        SEND_VAR_NO_REF_EX                                       $2
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $1
          6      > RETURN                                                   1

Class a:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BjHUH
function name:  __construct
number of ops:  7
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   FETCH_R                      global              ~1      'GLOBALS'
          1        FETCH_DIM_R                                      ~2      ~1, 'a'
          2        ASSIGN                                                   !0, ~2
    8     3        INIT_FCALL                                               'var_dump'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
    9     6      > RETURN                                                   null

End of function __construct

End of class a.

Class b: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.55 ms | 1394 KiB | 15 Q