no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
| Previous revisionNext revision |
— | rfc:typechecking [2012/03/04 01:39] – add paramter type casting hints proposal ircmaxell |
---|
| ===== 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:returntypehint2|Return value type hint]] by Will Fitch |
| * [[rfc:typehint|Return value and parameter type hint]] by Felipe |
| * [[rfc:typecheckingstrictandweak|Strict and weak parameter type checking]] by Lukas |
| * [[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 |
| |