3v4l.org

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

Function dick:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/to5ha
function name:  dick
number of ops:  5
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   10     1        INIT_METHOD_CALL                                         !0, 'f'
          2        DO_FCALL                                      0  $1      
          3      > RETURN                                                   $1
   11     4*     > RETURN                                                   null

End of function dick

Class t:
Function f:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/to5ha
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:
191.36 ms | 1389 KiB | 14 Q