PHP 7's type hints vs. the documentation's "hints" (bug #71051)

From: Date: Mon, 07 Dec 2015 21:00:51 +0000
Subject: PHP 7's type hints vs. the documentation's "hints" (bug #71051)
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969385976@lists.php.net to get a copy of this message
So someone just made a bug where the type "hints" in the documentation were misinterpreted as actual type hints, leading to the incompatible signature error. https://bugs.php.net/bug.php?id=71051 #71053 noticed that too (but that bug report is about something else). How should this and inevitable future questions be dealt with? Are there plans to do something in the documentation? Or should the internals folks start adding type hints to everything? It would be easy to argue that only class methods need attention as this problem mostly affects inheritance. What if the Interface Synopsis section more closely adhered to the method signature, meaning it doesn't include parameter or return types unless they are actually defined? And while there is the doc page about how to read the docs <http://php.net/manual/en/about.prototypes.php>, what will happen when functions and methods actually *do* start getting type hints? (This question has been brought up before regarding return types, but IIRC not about parameter types.)

« previous php.doc (#969385976) next »