News 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:
More on scalar type hints in PHP trunk
November 23, 2010 @ 09:13:24

Johannes Schluter has posted a bit more information about the scalar type hinting that's been included in the main development line of the PHP language (trunk).

Some time ago I wrote an article about the implementation of type hints for non-object types for PHP. Meanwhile many things happened and that implementation was replaced by a different one. Readers of my previous post might know that I have doubts about type hints in PHP.

He shows some of the example syntax for the hinting and points out how, in one case, there's no error thrown when the type hint is a native one but an error is thrown on a custom type hint.

So why is there a syntax added which is ignored? [...] Well, I let it to you to decide whether it make sense to have two syntaxes which look the same but do very different things (being ignored vs. throwing a terminating error) and whether it makes sense to push a system where the core language behaves differently depending on the system. [...] I seriously hoped PHP was out of the era of introducing new inconsistencies.
0 comments voice your opinion now!
scalar type hints trunk inconsistent


blog comments powered by Disqus

Similar Posts

NETTUTS.com: How to Open Zip Files with PHP

Stefan Mischook's Blog: What Makes a PHP Web Application?

Nikita Popov's Blog: Scalar type hinting is harder than you think

Johannes Schluter's Blog: More on scalar type hints in PHP trunk

Nikita Popov's Blog: Scalar type hinting is harder than you think


Community Events





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


library update interview opinion tool voicesoftheelephpant release community security package podcast install introduction composer framework symfony series version laravel language

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