3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface RequestInterface {} interface ResponseInterface {} class Request implements RequestInterface {} class Response implements ResponseInterface {} interface DelegateInterface { /** * Dispatch the next available middleware and return the response. * * @param RequestInterface $request * * @return ResponseInterface */ public function process(RequestInterface $request); } class Delegate implements DelegateInterface { public function process(RequestInterface $request): ResponseInterface { return new Response(); } } $delegate = new Delegate(); var_dump($delegate->process(new Request()));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GHoGD
function name:  (null)
number of ops:  15
compiled vars:  !0 = $delegate
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   DECLARE_CLASS                                            'request'
    7     1        DECLARE_CLASS                                            'response'
   21     2        DECLARE_CLASS                                            'delegate'
   29     3        NEW                                              $1      'Delegate'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $1
   31     6        INIT_FCALL                                               'var_dump'
          7        INIT_METHOD_CALL                                         !0, 'process'
          8        NEW                                              $4      'Request'
          9        DO_FCALL                                      0          
         10        SEND_VAR_NO_REF_EX                                       $4
         11        DO_FCALL                                      0  $6      
         12        SEND_VAR                                                 $6
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Class RequestInterface: [no user functions]
Class ResponseInterface: [no user functions]
Class Request: [no user functions]
Class Response: [no user functions]
Class DelegateInterface:
Function process:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GHoGD
function name:  process
number of ops:  2
compiled vars:  !0 = $request
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
          1      > RETURN                                                   null

End of function process

End of class DelegateInterface.

Class Delegate:
Function process:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GHoGD
function name:  process
number of ops:  7
compiled vars:  !0 = $request
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   RECV                                             !0      
   25     1        NEW                                              $1      'Response'
          2        DO_FCALL                                      0          
          3        VERIFY_RETURN_TYPE                                       $1
          4      > RETURN                                                   $1
   26     5*       VERIFY_RETURN_TYPE                                       
          6*     > RETURN                                                   null

End of function process

End of class Delegate.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.96 ms | 1437 KiB | 14 Q