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

Stubbles Blog:
My wishlist for PHP 6, pt1 The 'object' type hint
February 20, 2007 @ 09:07:00

Stephan Schmidt has posted some thoughts about type hinting in PHP5 (what's there) and the same kind of functionality for objects in PHP6 (what's to come).

I was very pleased, that PHP 5 introduced type hints, although they are not available for primitives like string, int, boolean, etc. Still, I'd like to see the object type hint introduced in any future version of PHP that allows me to specify, that a method or function only accepts an object, regardless of the type of the object.

He gives the example of Java's handling of the functionality and what PHP does with the same type of code. He also mentions that, via the Reflection API extension, some of this is possible already, so why not just include it from here on out?

0 comments voice your opinion now!
typehint php5 php6 object java common base class typehint php5 php6 object java common base class


blog comments powered by Disqus

Similar Posts

HowToForge.com: Running Apache2 With PHP5 And PHP4 At The Same Time

PHPBuilder.com: Using Ajax with PHP to Create an Interactive Web Page

HowTo Forge: Installing Lighttpd With PHP5 And MySQL Support On Mandriva 2008.0

Evert Pot's Blog: PHP: Arrays vs. Objects

Community News: GotAPI.com - A Gateway to Manuals


Community Events











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


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

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