3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Feature { public static function fromInput(array $featureInput) : self; } final class Covariance implements Feature { public static function fromInput(array $featureInput) : Feature { return new self(); } } $covariantReturnType = Covariance::fromInput([]); var_dump($covariantReturnType);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FYWFK
function name:  (null)
number of ops:  9
compiled vars:  !0 = $covariantReturnType
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   DECLARE_CLASS                                            'covariance'
   16     1        INIT_STATIC_METHOD_CALL                                  'Covariance', 'fromInput'
          2        SEND_VAL_EX                                              <array>
          3        DO_FCALL                                      0  $1      
          4        ASSIGN                                                   !0, $1
   18     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

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

End of function frominput

End of class Feature.

Class Covariance:
Function frominput:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FYWFK
function name:  fromInput
number of ops:  7
compiled vars:  !0 = $featureInput
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   12     1        NEW                          self                $1      
          2        DO_FCALL                                      0          
          3        VERIFY_RETURN_TYPE                                       $1
          4      > RETURN                                                   $1
   13     5*       VERIFY_RETURN_TYPE                                       
          6*     > RETURN                                                   null

End of function frominput

End of class Covariance.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
125.82 ms | 1400 KiB | 15 Q