Move return types in function/method prototypes
- Date: 2017-11-15
- Author: salathe
- Status: draft
Make the function prototypes look more like current PHP code by using the PHP 7 return type declaration syntax.
Before and after
int time ( void )
time ( void ) : int
The primary change is to PhD, which will need to be updated to move the rendering of the return type from before the function name to the end of the prototype.
A ticket was added to the bug tracker at https://bugs.php.net/bug.php?id=75527
A quick Pull Request has been submitted at https://github.com/php/phd/pull/17
The appendix page How to read a function definition (prototype) will need to be amended.
doc/todo/move_return_types_in_prototypes.txt · Last modified: 2017/11/15 09:17 by salathe