3v4l.org

run code in 500+ PHP versions simultaneously
<?php trait T { public function f(){ echo __CLASS__ . ' vs ' . static::class . ' vs ' . self::class . ' vs ' . T::class; } } class C { use T; } (new C())->f();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7SDdY
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    8     0  E >   DECLARE_CLASS                                                'c'
   12     1        NEW                                                  $0      'C'
          2        DO_FCALL                                          0          
          3        INIT_METHOD_CALL                                             $0, 'f'
          4        DO_FCALL                                          0          
          5      > RETURN                                                       1

Class T:
Function f:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7SDdY
function name:  f
number of ops:  11
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   FETCH_CLASS_NAME                                     ~0      
          1        CONCAT                                               ~1      ~0, '+vs+'
          2        FETCH_CLASS_NAME                                     ~2      
          3        CONCAT                                               ~3      ~1, ~2
          4        CONCAT                                               ~4      ~3, '+vs+'
          5        FETCH_CLASS_NAME                                     ~5      
          6        CONCAT                                               ~6      ~4, ~5
          7        CONCAT                                               ~7      ~6, '+vs+'
          8        CONCAT                                               ~8      ~7, 'T'
          9        ECHO                                                         ~8
    6    10      > RETURN                                                       null

End of function f

End of class T.

Class C: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
157.14 ms | 2324 KiB | 13 Q