3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait TraitA { abstract public function get(); } trait TraitB { public function get() { return 42; } } class ClassA { use TraitB; use TraitA; } var_dump((new ClassA)->get());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NXDG1
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   DECLARE_CLASS                                            'classa'
   22     1        INIT_FCALL                                               'var_dump'
          2        NEW                                              $0      'ClassA'
          3        DO_FCALL                                      0          
          4        INIT_METHOD_CALL                                         $0, 'get'
          5        DO_FCALL                                      0  $2      
          6        SEND_VAR                                                 $2
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

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

End of function get

End of class TraitA.

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

End of function get

End of class TraitB.

Class ClassA: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.14 ms | 1395 KiB | 15 Q