3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Whatever{ public function getSomething(); } interface Something extends Whatever{ public function getSomething() : Something; } class Test implements Something{ public function getSomething() : Something { return $this; } } $a = new Test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/auQqF
function name:  (null)
number of ops:  6
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   DECLARE_CLASS                                            'something'
   16     1        DECLARE_CLASS                                            'test'
   25     2        NEW                                              $1      'Test'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $1
          5      > RETURN                                                   1

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

End of function getsomething

End of class Whatever.

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

End of function getsomething

End of class Something.

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

End of function getsomething

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.65 ms | 1398 KiB | 13 Q