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

Johannes Schluter's Blog:
Scalar type hints in PHP trunk
August 09, 2010 @ 08:44:23

As Johannes Schluter mentions in his latest blog post, another new feature has been added to the trunk of the PHP project - scalar type hints.

So in my blog series I try to cover all additions to PHP trunk so I have to mention scalar type hints.

He gives examples of both simple hinting (ensuring a value is a float) and a more complex example setting an attribute on a PDO connection (checking for an integer). Sample error messages are included as well. He also gives some advice on mixing strong and weak typing in your apps - it's like "opening a can of worms".

0 comments voice your opinion now!
scalar type hint trunk feature language


blog comments powered by Disqus

Similar Posts

PHP.net: PHP 5.4.0 RC8 released

Brian Moon's Blog: Short Array Syntax for PHP

Pierre-Alain Joye's Blog: Howto use a single php.ini for cli/cgi with htscanner, use 0.7.0 or later

Hyperpolyglot.org: Syntax for Common Tasks - Side-by-side (Ruby, Perl, Python & PHP)

PHPClasses.org: Lately in PHP Podcast Episode 19 - The Debate of Making PHP Faster using a JIT


Community Events











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


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

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