3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Calculation { } class TravelCalculation extends Calculation { } interface Service { public function run(Calculation $c); } class TravelService implements Service { public function run(TravelCalculation $c) { echo "Travel Service calculation"; } } $calculation = new TravelCalculation(); $service = new TravelService(); $service->run($calculation);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/efKNW
function name:  (null)
number of ops:  11
compiled vars:  !0 = $calculation, !1 = $service
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   DECLARE_CLASS                                            'travelservice'
   20     1        NEW                                              $2      'TravelCalculation'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
   21     4        NEW                                              $5      'TravelService'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $5
   23     7        INIT_METHOD_CALL                                         !1, 'run'
          8        SEND_VAR_EX                                              !0
          9        DO_FCALL                                      0          
         10      > RETURN                                                   1

Class Calculation: [no user functions]
Class TravelCalculation: [no user functions]
Class Service:
Function run:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/efKNW
function name:  run
number of ops:  2
compiled vars:  !0 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
          1      > RETURN                                                   null

End of function run

End of class Service.

Class TravelService:
Function run:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/efKNW
function name:  run
number of ops:  3
compiled vars:  !0 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
   16     1        ECHO                                                     'Travel+Service+calculation'
   17     2      > RETURN                                                   null

End of function run

End of class TravelService.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.15 ms | 1394 KiB | 13 Q