3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface SomeInterface { public function getSomeInterface() : SomeInterface; } class SomeClass implements SomeInterface { public function getSomeInterface() : SomeInterface { return $this; } } $object = new SomeClass(); var_dump($object->getSomeInterface());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/as4I1
function name:  (null)
number of ops:  10
compiled vars:  !0 = $object
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   DECLARE_CLASS                                            'someclass'
   20     1        NEW                                              $1      'SomeClass'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   23     4        INIT_FCALL                                               'var_dump'
          5        INIT_METHOD_CALL                                         !0, 'getSomeInterface'
          6        DO_FCALL                                      0  $4      
          7        SEND_VAR                                                 $4
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

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

End of function getsomeinterface

End of class SomeInterface.

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

End of function getsomeinterface

End of class SomeClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.96 ms | 1387 KiB | 15 Q