3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait AbstractTrait { abstract public function selfReturner() : self; } trait ConcreteTrait { public function selfReturner() : self { return $this; } } class Test { use AbstractTrait; use ConcreteTrait; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Go6WO
function name:  (null)
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   DECLARE_CLASS                                            'test'
   16     1      > RETURN                                                   1

Class AbstractTrait:
Function selfreturner:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Go6WO
function name:  selfReturner
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 selfreturner

End of class AbstractTrait.

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

End of function selfreturner

End of class ConcreteTrait.

Class Test: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
182.25 ms | 1393 KiB | 13 Q