3v4l.org

run code in 500+ PHP versions simultaneously
<?php interface Collection { } interface Geocoder { public function geocode(): Collection; } class MyCollection implements Collection { } class MyGeocoder implements Geocoder { public function geocode(): MyCollection { return new MyCollection(); } } class Consumer { public function __construct(MyGeocoder $gecoder) { // } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kv9pn
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   12     0  E >   DECLARE_CLASS                                                'mycollection'
   16     1        DECLARE_CLASS                                                'mygeocoder'
   27     2      > RETURN                                                       1

Class Collection: [no user functions]
Class Geocoder:
Function geocode:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kv9pn
function name:  geocode
number of ops:  2
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    9     0  E >   VERIFY_RETURN_TYPE                                           
          1      > RETURN                                                       null

End of function geocode

End of class Geocoder.

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

End of function geocode

End of class MyGeocoder.

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

End of function __construct

End of class Consumer.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
126.42 ms | 474 KiB | 7 Q