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

Ilia Alshanetsky's Blog:
Type hinting for PHP 5.3
July 02, 2009 @ 09:46:18

One of the features included in the PHP 5.x releases is type hinting for validating that you have the right values for your functions and methods coming in. In this new post to his blog Ilia Alshanetshy takes a look at the the feature and gives a patch to add it .

On a general level most people agree it would be a good idea to have, since it is an optional feature and does not introduce any regressions, heck you can even mix type hinted code with the non-type hinted one. The "PROBLEM" has always been combining of PHP's typeless nature with type hinting, which is where the consensus has been difficult (impossible) to reach.

He mentions an example of why its such an issue (technically, both 1 and "1" are valid numbers) and includes a link to a patch that gives a new hint to help with the problem.

0 comments voice your opinion now!
patch scalar numeric typehinting


blog comments powered by Disqus

Similar Posts

Bill Staples' Blog: IIS7 Patch for Windows Vista fixes CGI/PHP apps - multiple response headers

DevShed: The Switch Statement and Arrays

Ilia Alshanetsky's Blog: Type hinting for PHP 5.3

Slawek Lukasiewicz's Blog: Throwing Exception with Type Hinting Failed

Suspekt Blog: Suhosin Patch 0.9.8 for PHP 5.3.0 *BETA* - Please Test


Community Events











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


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

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