3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait Test { private $bridge; public function implement() { echo $this->foo; } } class A { use Test; private $foo = 'bar'; public function __construct() { $this->implement(); } public function foo() { echo $this->bridge; } } class B extends A { private $foo = 'baz'; } new A();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4c2v2
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   DECLARE_CLASS                                            'a'
   29     1        DECLARE_CLASS                                            'b', 'a'
   33     2        NEW                                              $0      'A'
          3        DO_FCALL                                      0          
          4        FREE                                                     $0
          5      > RETURN                                                   1

Class Test:
Function implement:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4c2v2
function name:  implement
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   FETCH_OBJ_R                                      ~0      'foo'
          1        ECHO                                                     ~0
   10     2      > RETURN                                                   null

End of function implement

End of class Test.

Class A:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4c2v2
function name:  __construct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   INIT_METHOD_CALL                                         'implement'
          1        DO_FCALL                                      0          
   21     2      > RETURN                                                   null

End of function __construct

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4c2v2
function name:  foo
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   FETCH_OBJ_R                                      ~0      'bridge'
          1        ECHO                                                     ~0
   26     2      > RETURN                                                   null

End of function foo

End of class A.

Class B: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.3 ms | 1385 KiB | 13 Q