3v4l.org

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

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

End of function f

End of class t.

Class c: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.92 ms | 1393 KiB | 13 Q