3v4l.org

run code in 500+ PHP versions simultaneously
<?php interface PaginatorInterface { } class Paginator implements PaginatorInterface { } class BookRepository { use CreatePaginatorTrait; protected function getPaginator(): Paginator { return new Paginator(); } } trait CreatePaginatorTrait { protected function getPaginator(): PaginatorInterface { return new Paginator(); } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/O58qm
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   DECLARE_CLASS                                                'paginator'
   11     1        DECLARE_CLASS                                                'bookrepository'
   26     2      > RETURN                                                       1

Class PaginatorInterface: [no user functions]
Class Paginator: [no user functions]
Class BookRepository:
Function getpaginator:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/O58qm
function name:  getPaginator
number of ops:  6
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   16     0  E >   NEW                                                  $0      'Paginator'
          1        DO_FCALL                                          0          
          2        VERIFY_RETURN_TYPE                                           $0
          3      > RETURN                                                       $0
   17     4*       VERIFY_RETURN_TYPE                                           
          5*     > RETURN                                                       null

End of function getpaginator

End of class BookRepository.

Class CreatePaginatorTrait:
Function getpaginator:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/O58qm
function name:  getPaginator
number of ops:  6
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   24     0  E >   NEW                                                  $0      'Paginator'
          1        DO_FCALL                                          0          
          2        VERIFY_RETURN_TYPE                                           $0
          3      > RETURN                                                       $0
   25     4*       VERIFY_RETURN_TYPE                                           
          5*     > RETURN                                                       null

End of function getpaginator

End of class CreatePaginatorTrait.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
155.77 ms | 1481 KiB | 12 Q