doc:todo:move_return_types_in_prototypes

This is an old revision of the document!


Move return types in function/method prototypes

  • Date: 2017-11-15
  • Author: salathe
  • Status: draft

Motivation

Make the function prototypes look more like current PHP code by using the PHP 7 return type declaration syntax.

Before and after

Before:

int time ( void )

After:

time ( void ) : int

Changes required

PhD

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

PHP Manual

The appendix page How to read a function definition (prototype) will need to be amended.

doc/todo/move_return_types_in_prototypes.1510737443.txt.gz · Last modified: 2017/11/15 09:17 by salathe