3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait Foo { final protected function bar() { echo 'Foo'; } } class FooBar { use Foo; public function __construct() { $this->bar(); } } class FooBarBar extends FooBar { protected function bar() { echo 'FooBarBar'; } } new FooBar();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/loOqQ
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   DECLARE_CLASS                                            'foobar'
   22     1        DECLARE_CLASS                                            'foobarbar', 'foobar'
   32     2        NEW                                              $0      'FooBar'
          3        DO_FCALL                                      0          
          4        FREE                                                     $0
          5      > RETURN                                                   1

Class Foo:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/loOqQ
function name:  bar
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ECHO                                                     'Foo'
    8     1      > RETURN                                                   null

End of function bar

End of class Foo.

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

End of function __construct

End of class FooBar.

Class FooBarBar:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/loOqQ
function name:  bar
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   ECHO                                                     'FooBarBar'
   27     1      > RETURN                                                   null

End of function bar

End of class FooBarBar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.59 ms | 995 KiB | 13 Q