3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface ConfigurationProvider { public function getConfig() : array; } final class ConfigurationProviderNonImplementing { public function getConfig() { return []; } } $provider = new ConfigurationProviderNonImplementing(); var_dump(! $provider instanceof ConfigProviderInterface && ! is_callable([$provider, 'getConfig']));
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 7, Position 2 = 14
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/IUSPG
function name:  (null)
number of ops:  17
compiled vars:  !0 = $provider
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $1      'ConfigurationProviderNonImplementing'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   19     3        INIT_FCALL                                               'var_dump'
          4        INSTANCEOF                                       ~4      !0, 'ConfigProviderInterface'
          5        BOOL_NOT                                         ~5      ~4
          6      > JMPZ_EX                                          ~5      ~5, ->14
          7    >   INIT_FCALL                                               'is_callable'
          8        INIT_ARRAY                                       ~6      !0
          9        ADD_ARRAY_ELEMENT                                ~6      'getConfig'
         10        SEND_VAL                                                 ~6
         11        DO_ICALL                                         $7      
         12        BOOL_NOT                                         ~8      $7
         13        BOOL                                             ~5      ~8
         14    >   SEND_VAL                                                 ~5
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

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

End of function getconfig

End of class ConfigurationProvider.

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

End of function getconfig

End of class ConfigurationProviderNonImplementing.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.78 ms | 1396 KiB | 17 Q