PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net


 

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.txt · Last modified: 2009/07/03 20:52 by pbiggar
 
Atom | show source | credits | stats | sitemap | contact | advertising | mirror sites