Request for Comments: Parameter type specification

Various RFCs that have been proposed for parameter and return typing.

History

PHP is a dynamically typed language, that does automatic type juggling where ever possible. With PHP 5 a new feature called "type hinting" was introduced for arrays and objects. However the name “hint” is a bit misnamed, since triggers an E_RECOVERABLE_ERROR. While a fatal error can be prevented with an error handler, its not really nicely doable, since this needs to happen in a global error handler, far away in terms of code from the original context. It also comes with quite an overhead.