3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); interface Hydrator { public function hydrate($incoming, $model) : string; } interface ContextualHydratorExtension extends Hydrator { public function hydrate($incoming, $model, $context = null) : string; } interface ContextualHydrator { public function hydrateWithContext($incoming, $model, $context = null) : string; } class PlsContextHydrator implements Hydrator, ContextualHydratorExtension, ContextualHydrator { public function hydrate($incoming, $model, $context = null) : string { return sprintf("%s('%s')", __METHOD__, implode(', ', func_get_args())); } public function hydrateWithContext($incoming, $model, $context = null) : string { return $this->hydrate($incoming, $model, $context); } } $hydrator = new PlsContextHydrator(); var_dump( $hydrator->hydrate('nah', 'maybes', 'whatever') );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/71v8s
function name:  (null)
number of ops:  14
compiled vars:  !0 = $hydrator
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   DECLARE_CLASS                                            'contextualhydratorextension'
   19     1        DECLARE_CLASS                                            'plscontexthydrator'
   32     2        NEW                                              $1      'PlsContextHydrator'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $1
   34     5        INIT_FCALL                                               'var_dump'
   35     6        INIT_METHOD_CALL                                         !0, 'hydrate'
          7        SEND_VAL_EX                                              'nah'
          8        SEND_VAL_EX                                              'maybes'
          9        SEND_VAL_EX                                              'whatever'
         10        DO_FCALL                                      0  $4      
         11        SEND_VAR                                                 $4
         12        DO_ICALL                                                 
   36    13      > RETURN                                                   1

Class Hydrator:
Function hydrate:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/71v8s
function name:  hydrate
number of ops:  4
compiled vars:  !0 = $incoming, !1 = $model
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        VERIFY_RETURN_TYPE                                       
          3      > RETURN                                                   null

End of function hydrate

End of class Hydrator.

Class ContextualHydratorExtension:
Function hydrate:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/71v8s
function name:  hydrate
number of ops:  5
compiled vars:  !0 = $incoming, !1 = $model, !2 = $context
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV_INIT                                        !2      null
          3        VERIFY_RETURN_TYPE                                       
          4      > RETURN                                                   null

End of function hydrate

End of class ContextualHydratorExtension.

Class ContextualHydrator:
Function hydratewithcontext:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/71v8s
function name:  hydrateWithContext
number of ops:  5
compiled vars:  !0 = $incoming, !1 = $model, !2 = $context
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV_INIT                                        !2      null
          3        VERIFY_RETURN_TYPE                                       
          4      > RETURN                                                   null

End of function hydratewithcontext

End of class ContextualHydrator.

Class PlsContextHydrator:
Function hydrate:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/71v8s
function name:  hydrate
number of ops:  17
compiled vars:  !0 = $incoming, !1 = $model, !2 = $context
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV_INIT                                        !2      null
   23     3        INIT_FCALL                                               'sprintf'
          4        SEND_VAL                                                 '%25s%28%27%25s%27%29'
          5        SEND_VAL                                                 'PlsContextHydrator%3A%3Ahydrate'
          6        INIT_FCALL                                               'implode'
          7        SEND_VAL                                                 '%2C+'
          8        FUNC_GET_ARGS                                    ~3      
          9        SEND_VAL                                                 ~3
         10        DO_ICALL                                         $4      
         11        SEND_VAR                                                 $4
         12        DO_ICALL                                         $5      
         13        VERIFY_RETURN_TYPE                                       $5
         14      > RETURN                                                   $5
   24    15*       VERIFY_RETURN_TYPE                                       
         16*     > RETURN                                                   null

End of function hydrate

Function hydratewithcontext:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/71v8s
function name:  hydrateWithContext
number of ops:  12
compiled vars:  !0 = $incoming, !1 = $model, !2 = $context
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV_INIT                                        !2      null
   28     3        INIT_METHOD_CALL                                         'hydrate'
          4        SEND_VAR_EX                                              !0
          5        SEND_VAR_EX                                              !1
          6        SEND_VAR_EX                                              !2
          7        DO_FCALL                                      0  $3      
          8        VERIFY_RETURN_TYPE                                       $3
          9      > RETURN                                                   $3
   29    10*       VERIFY_RETURN_TYPE                                       
         11*     > RETURN                                                   null

End of function hydratewithcontext

End of class PlsContextHydrator.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170 ms | 1400 KiB | 19 Q