3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php interface A { public function a() : A; } class B implements A { public function a() : A { return $this; } } $b = new B();
based on vIp9T
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0u7Wp
function name:  (null)
number of ops:  8
compiled vars:  !0 = $b
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   NOP                                                      
   7     1        DECLARE_CLASS                                    $2      'b'
         2        ADD_INTERFACE                                            $2, 'A'
         3        VERIFY_ABSTRACT_CLASS                                    $2
  14     4        NEW                                              $3      :-1
         5        DO_FCALL                                      0          
         6        ASSIGN                                                   !0, $3
         7      > RETURN                                                   1

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

End of function a

End of class A.

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

End of function a

End of class B.

Generated using Vulcan Logic Dumper, using php 7.3.0