rfc:typechecking

This is an old revision of the document!


Request for Comments: Parameter type specification

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.

rfc/typechecking.1302087566.txt.gz · Last modified: 2017/09/22 13:28 (external edit)