Agreed, self documenting is best, but every capable IDE will display a PHPDoc comment as you hover or autocomplete a method/property.
Smalltalk is completely Dynamically typed. I really had no idea how much of a blessing it is to be rid of types until I tried Smalltalk. Even PHP (even before type-hinting in php5) really pales in comparison to the 'freedom' offered in ST.
My day-to-day job involves multiple langauges. This month alone I have developed Smalltalk, *spit* Java, C#, and *spit* VB6. I, honestly, with absolute first hand experience, categorically and emphatically state as fact that more time is spent faffing with types and interfaces than actually dealing with problems and design when using Java, C# and VB6. Even the hardcore C# and Java developers in my office, who turn their nose up at ST and other dynamic languages, agree that a lot of time is spent on deciphering which types/interfaces/namespaces should be used, etc.
One key example, is a problem I was facing earlier this year in C#. I was tasked with creating a wrapper for a new WSDL service offered by a client, to interface with a VB6 COM application of ours. Whoopee.. water carrying.
Two of the services, which have different namespaces, are identical - except for the addition of one property. So, simply extend one service with the other, right? Wrong. In C#, you cannot override the type of a datafield, without overriding everything that needs to interact with that datafield as well, or your write converter delegates as a property, else you face the off chance that you just might get a runtime error. What was utterly annoying about this? The datafield I was overriding was *identical* to the super, in every given way, except for the namespace.
"Type-safety" is the compiler author's answer to "I can't be bothered doing forward lookups" .. in Smalltalk, when you call a method (aka: send a message) the object is first asked if it responds to it; if it doesn't, it will say (literally) Message Not Understood: <detail of message> in an exception. At runtime. Not "this might be a problem so I won't compile" not "I've looked for you, I refuse to build because this might not understand this, based on the contract it hasn't signed over there."
In Java, C#, etc. type-safety is enforced so that you never get to this lack of functionality, and there are problems that happen because of it; and often incorrectly shrugged off as a design problem. In fact sometimes code smells enter the foray just to get around these problems, such as mine above, it ended up being a copy-paste of code.
If Java, C#, et al. just simply wrote a decent compiler/runtime the world would be a better place. If everyone stopped using private/protected, birds would sing, the sun would shine and Jenk would not feel patronised, insulted, and like ripping his hair out so much.
