3v4l.org

run code in 300+ PHP versions simultaneously
<?php Class MyRequest implements RequestInterface { public function getMethod() { // TODO: Implement getMethod() method. } public function getPath() { // TODO: Implement getPath() method. } } class Client { public function execute(RequestInterface $request) { return 0; } } interface RequestInterface { /** * @return string */ public function getMethod(); /** * @return string */ public function getPath(); } $request = new MyRequest(); $client = (new Client)->execute($request); var_dump($client);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/K8O56
function name:  (null)
number of ops:  14
compiled vars:  !0 = $request, !1 = $client
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   DECLARE_CLASS                                            'myrequest'
   36     1        NEW                                              $2      'MyRequest'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
   37     4        NEW                                              $5      'Client'
          5        DO_FCALL                                      0          
          6        INIT_METHOD_CALL                                         $5, 'execute'
          7        SEND_VAR_EX                                              !0
          8        DO_FCALL                                      0  $7      
          9        ASSIGN                                                   !1, $7
   39    10        INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

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

End of function getmethod

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

End of function getpath

End of class MyRequest.

Class Client:
Function execute:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/K8O56
function name:  execute
number of ops:  3
compiled vars:  !0 = $request
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   RECV                                             !0      
   19     1      > RETURN                                                   0
   20     2*     > RETURN                                                   null

End of function execute

End of class Client.

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

End of function getmethod

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

End of function getpath

End of class RequestInterface.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.7 ms | 1005 KiB | 14 Q