3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface SomeInterface { public function getSomeInterface() : SomeInterface; } class SomeClass implements SomeInterface { public function getSomeInterface() : SomeInterface { debug_print_backtrace(); 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/JW8P9
function name:  (null)
number of ops:  10
compiled vars:  !0 = $object
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   DECLARE_CLASS                                            'someclass'
   23     1        NEW                                              $1      'SomeClass'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   26     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/JW8P9
function name:  getSomeInterface
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     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/JW8P9
function name:  getSomeInterface
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_FCALL                                               'debug_print_backtrace'
          1        DO_ICALL                                                 
   18     2        FETCH_THIS                                       ~1      
          3        VERIFY_RETURN_TYPE                                       ~1
          4      > RETURN                                                   ~1
   19     5*       VERIFY_RETURN_TYPE                                       
          6*     > RETURN                                                   null

End of function getsomeinterface

End of class SomeClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.04 ms | 1387 KiB | 17 Q