3v4l.org

run code in 500+ PHP versions simultaneously
<?php trait PrivateTrait { private function hello() { echo 'HI!'; } } class Foo { use PrivateTrait; public function sayIt() { $this->hello(); } } (new Foo())->sayIt();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/O2aPl
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    9     0  E >   DECLARE_CLASS                                                'foo'
   17     1        NEW                                                  $0      'Foo'
          2        DO_FCALL                                          0          
          3        INIT_METHOD_CALL                                             $0, 'sayIt'
          4        DO_FCALL                                          0          
          5      > RETURN                                                       1

Class PrivateTrait:
Function hello:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/O2aPl
function name:  hello
number of ops:  2
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   ECHO                                                         'HI%21'
    6     1      > RETURN                                                       null

End of function hello

End of class PrivateTrait.

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

End of function sayit

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
219.81 ms | 2074 KiB | 13 Q