Consistency in PHP
Posted on August 14, 2007
Over the last few weeks, I’ve slowly been driven more and more crazy by the lack of consistency in PHP. Granted, I’ve known (and accepted) that PHP was inconsistent in both function naming convention and parameter order for quite a while now but it’s a lot more frustrating when you’re working through a large project and have to refer to the documentation to see which order they’ve gone for this time. Then I saw the error: “Parse error: syntax error, unexpected ‘[’, expecting T_PAAMAYIM_NEKUDOTAYIM…” and thought they’ve really lost the plot this time.
Turns out PAAMAYIM NEKUDOTAYIM is the hebrew for “double colon”. So the error was actually referring to a :: syntax problem. Wouldn’t it have been much simpler for everybody involved to have all of the token names in English (or any language provided it was consistent)? Can we look forward to error messages in foreign languages in future? While they’ll be humorous (as I’ll admit, the PAA… thing is), they detract from one of PHPs main goals of being easy to use.
I anxiously await PHP6, the best feature I’ve heard about is that they’re going to make the language more consistent, even at the cost of backwards compatibility.
» Filed Under Development
Comments
Leave a Reply

