Haha, I guess everybody is as confused as me.Actually, the habit is coming from C, where you have to type all of your variables and functions. I'm actually not all that specific about typing in php, but my current project will be offered to the public eye, so I've been trying to take all steps into making it clean and legible to others.I suppose my confusion starts at the php docs:
As you notice, they describe all the functions and tell you 1) the type the function returns, and 2) the types it takes as arguments.I do know that we don't have to declare types of variables, but I wanted to - I suppose what I wanted was for the functions I declared to throw an error if it was sent the wrong type (that is, without having to rely on the error catching code).Also, in the IDE that I use, functions you declare get added to the autocomplete list. My neurotic side wanted the little description to include those types.Anyhow, I suppose I'll leave it be for now and just stick with what works. Thanks for everybody's input!--UpdateGrr, If I only knew what to look for in the docs. Seems the answer was right there:http://us3.php.net/manual/en/language.oop5.typehinting.phpQuote from the little text at the bottom: