3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface I{} trait T{ function t(){} } function a(): T { return new class implements I{ use T; }; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sasJ2
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E > > RETURN                                                   1

Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sasJ2
function name:  a
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   DECLARE_ANON_CLASS                               <reference>   
          1        NEW                                              $1      $0
          2        DO_FCALL                                      0          
          3        VERIFY_RETURN_TYPE                                       $1
          4      > RETURN                                                   $1
   13     5*       VERIFY_RETURN_TYPE                                       
          6*     > RETURN                                                   null

End of function a

Class I: [no user functions]
Class T:
Function t:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sasJ2
function name:  t
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E > > RETURN                                                   null

End of function t

End of class T.

Class I@anonymous: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.26 ms | 1393 KiB | 13 Q