3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait MyTrait { abstract public function traitMethod($param): bool; } class ChildClass { use MyTrait; public function traitMethod(int $param): bool { // change trait method parameter type // implementation } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/l1bpJ
function name:  (null)
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   DECLARE_CLASS                                            'childclass'
   14     1      > RETURN                                                   1

Class MyTrait:
Function traitmethod:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/l1bpJ
function name:  traitMethod
number of ops:  3
compiled vars:  !0 = $param
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        VERIFY_RETURN_TYPE                                       
          2      > RETURN                                                   null

End of function traitmethod

End of class MyTrait.

Class ChildClass:
Function traitmethod:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/l1bpJ
function name:  traitMethod
number of ops:  3
compiled vars:  !0 = $param
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   13     1        VERIFY_RETURN_TYPE                                       
          2      > RETURN                                                   null

End of function traitmethod

End of class ChildClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.9 ms | 999 KiB | 14 Q