3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface MyInterface { public function doSomethingAndGetNextStep(): ?MyInterface; } class MyService implements MyInterface { public function doSomethingAndGetNextStep(): null { // do something here, like all other implementations // final one in chain return null; } } $a = new MyService(); var_dump($a->doSomethingAndGetNextStep());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4oW9v
function name:  (null)
number of ops:  10
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   DECLARE_CLASS                                            'myservice'
   20     1        NEW                                              $1      'MyService'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   22     4        INIT_FCALL                                               'var_dump'
          5        INIT_METHOD_CALL                                         !0, 'doSomethingAndGetNextStep'
          6        DO_FCALL                                      0  $4      
          7        SEND_VAR                                                 $4
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Class MyInterface:
Function dosomethingandgetnextstep:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4oW9v
function name:  doSomethingAndGetNextStep
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 dosomethingandgetnextstep

End of class MyInterface.

Class MyService:
Function dosomethingandgetnextstep:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4oW9v
function name:  doSomethingAndGetNextStep
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E > > RETURN                                                   null
   16     1*       VERIFY_RETURN_TYPE                                       
          2*     > RETURN                                                   null

End of function dosomethingandgetnextstep

End of class MyService.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.39 ms | 997 KiB | 14 Q