===== Request for Comments: Parameter type specification ===== Various RFCs that have been proposed for parameter and return typing. === History === PHP is a [[http://php.net/types|dynamically typed language]], that does [[http://php.net/manual/en/language.types.type-juggling.php|automatic type juggling]] where ever possible. With PHP 5 a new feature called [[http://ch2.php.net/manual/en/language.oop5.typehinting.php|"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. * [[rfc:returntypehint|Return value type hint]] by Felipe * [[rfc:typehint|Return value and parameter type hint]] by Felipe * [[rfc:typecheckingstrictandweak|Strict and weak parameter type checking]] by Lukas and Zeev * [[rfc:typecheckingstrictonly|Optional Strict Type Checking for Scalars]] by Paul (Ilia's proposal) * [[rfc:typecheckingparseronly|Parser and Reflection-API only Type Hints]] by Derick (Implemented) * [[rfc:parameter_type_casting_hints|Parameter Type Casting Hints]] by Anthony