News Feed
Jobs Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Sebastian Bergmann's Blog:
Scalar Type Hints in PHP 5.3.99
November 24, 2010 @ 10:04:06

In the theme of other recent posts mentioning the scalar type hinting that has been included in the main line of code that is headed towards the next PHP release, Sebastian Bergmann has a new post about their inclusion in PHP 5.3.99 (yes, that's PHP 5.4) and the new syntax it introduces.

In a nutshell, this means that PHP 5.3.99 introduces new syntax -- scalar type hints -- but no new semantics. The latter can either be implemented as an extension written in C/C++, in userland PHP code, or in a tool that statically analyzes the code.

He includes an example fro userland with a "php_check_parameters" function that looks at the arguments of the current method and uses Reflection to check against the type hints for the correct value type.

0 comments voice your opinion now!
reflection scalar type hint feature userland


blog comments powered by Disqus

Similar Posts

PHPKitchen.com: Many new features in latest 0.6.2 release of Seagull Framework

Brian Moon's Blog: Phorum 5.2.0-alpha released

McGlockenshire.com: Waiting for PHP 5.4: Death to prehistoric cruft

ITtoolbox.com: So I\'m a PHP developer and my company runs SAP now what?

International PHP Magazine: Poll Question: Which is the Best Feature for PHPExcel Version 1.0.0?


Community Events











Don't see your event here?
Let us know!


unittest opinion install language symfony2 podcast security database framework performance overview package facebook release composer hack application hhvm introduction component

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework