3v4l.org

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

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

End of function getid

End of class T.

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

End of function get

End of class C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.31 ms | 1385 KiB | 13 Q