3v4l.org

run code in 300+ PHP versions simultaneously
<?php class X { public function __construct($a = 0) { $a = 33; $this->a(); } protected function 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/PAAgc
function name:  (null)
number of ops:  6
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   NEW                                              $1      'X'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   20     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/PAAgc
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/PAAgc
function name:  a
number of ops:  8
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   CONCAT                                           ~1      !0, 'x'
          1        ECHO                                                     ~1
   13     2        INIT_FCALL                                               'var_dump'
          3        INIT_FCALL                                               'get_defined_vars'
          4        DO_ICALL                                         $2      
          5        SEND_VAR                                                 $2
          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:
146.88 ms | 1395 KiB | 17 Q