3v4l.org

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

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

End of function test

End of class T.

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

End of function g

End of class T2.

Class A: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.39 ms | 1385 KiB | 13 Q