3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface A { public function a() : A; } class B implements A { public function a() : A { return $this; } } $b = new B();
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:  5
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   DECLARE_CLASS                                            'b'
   14     1        NEW                                              $1      'B'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
          4      > 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 8.0.0


preferences:
174.36 ms | 1394 KiB | 13 Q