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

Tibo Beijen's Blog:
Explicit PHP6?
Jun 12, 2009 @ 15:27:26

Tibo Beijen takes his own look at some of what PHP6 will have to offer and talks a bit about how it would have helped him in a current project:

I'm currently working on [a project] where I've been experimenting with 'domain objects' having 'scalar' or 'value' objects as properties (more on that later).

The talks specifically about two of the upcoming features - type hinting and the __cast magic method that allows you to correctly cast a variable into a different type. He illustrates with some code that handles and manipulates user data and handles exceptions on an incorrect type cast.

tagged: typehint cast php6

Link:


Trending Topics: