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.'x'; var_dump(get_defined_vars()); } } $x = new X(); $x->a();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ddMIF
function name:  (null)
number of ops:  6
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   NEW                                              $1      'X'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   21     3        INIT_METHOD_CALL                                         !0, 'a'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class X:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ddMIF
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/ddMIF
function name:  a
number of ops:  9
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   BIND_GLOBAL                                              !0, 'a'
   12     1        CONCAT                                           ~1      !0, 'x'
          2        ECHO                                                     ~1
   14     3        INIT_FCALL                                               'var_dump'
          4        INIT_FCALL                                               'get_defined_vars'
          5        DO_ICALL                                         $2      
          6        SEND_VAR                                                 $2
          7        DO_ICALL                                                 
   15     8      > RETURN                                                   null

End of function a

End of class X.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.22 ms | 1395 KiB | 17 Q