3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface IRequest { public function test(); } class CreditMode implements IRequest{ public function test(){ echo "test in CreditMode\n"; } } class Father { public function from(IRequest $source) {} } class Son extends Father { public function from(IRequest $request) { $request->test(); } } $son = new Son(); $son->from(new CreditMode());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RSINP
function name:  (null)
number of ops:  10
compiled vars:  !0 = $son
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   DECLARE_CLASS                                            'creditmode'
   25     1        NEW                                              $1      'Son'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   26     4        INIT_METHOD_CALL                                         !0, 'from'
          5        NEW                                              $4      'CreditMode'
          6        DO_FCALL                                      0          
          7        SEND_VAR_NO_REF_EX                                       $4
          8        DO_FCALL                                      0          
          9      > RETURN                                                   1

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

End of function test

End of class IRequest.

Class CreditMode:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RSINP
function name:  test
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ECHO                                                     'test+in+CreditMode%0A'
   10     1      > RETURN                                                   null

End of function test

End of class CreditMode.

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

End of function from

End of class Father.

Class Son:
Function from:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RSINP
function name:  from
number of ops:  4
compiled vars:  !0 = $request
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   RECV                                             !0      
   22     1        INIT_METHOD_CALL                                         !0, 'test'
          2        DO_FCALL                                      0          
   23     3      > RETURN                                                   null

End of function from

End of class Son.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.83 ms | 1395 KiB | 13 Q