3v4l.org

run code in 300+ PHP versions simultaneously
<?php class X { public function __construct($a = 0) { $a = 33; $this->a(); } protected function a () { global $a; echo $a; var_dump(get_defined_vars()); } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ocntb
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E > > RETURN                                                   1

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

End of function __construct

Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ocntb
function name:  a
number of ops:  8
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   BIND_GLOBAL                                              !0, 'a'
   11     1        ECHO                                                     !0
   13     2        INIT_FCALL                                               'var_dump'
          3        INIT_FCALL                                               'get_defined_vars'
          4        DO_ICALL                                         $1      
          5        SEND_VAR                                                 $1
          6        DO_ICALL                                                 
   14     7      > RETURN                                                   null

End of function a

End of class X.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.98 ms | 1395 KiB | 17 Q