3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait TraitA { public function moo() { print_r("moo"); } } class ClassA { use TraitA { moo as bar; } } $a = new ClassA(); $a->bar();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JcRtA
function name:  (null)
number of ops:  7
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   DECLARE_CLASS                                            'classa'
   15     1        NEW                                              $1      'ClassA'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   16     4        INIT_METHOD_CALL                                         !0, 'bar'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Class TraitA:
Function moo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JcRtA
function name:  moo
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'print_r'
          1        SEND_VAL                                                 'moo'
          2        DO_ICALL                                                 
    6     3      > RETURN                                                   null

End of function moo

End of class TraitA.

Class ClassA: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.43 ms | 1394 KiB | 15 Q