3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait T1 { private function foo() { echo "foo"; } private function foo1() { } } trait T2 { use T1; } class A { use T2; public function f() { echo "f"; $this->foo(); } } (new A)->f();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CQtMm
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   DECLARE_CLASS                                            't2'
   16     1        DECLARE_CLASS                                            'a'
   25     2        NEW                                              $0      'A'
          3        DO_FCALL                                      0          
          4        INIT_METHOD_CALL                                         $0, 'f'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

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

End of function foo

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

End of function foo1

End of class T1.

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

End of function f

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.15 ms | 1394 KiB | 13 Q