When I first learned PHP, my position was, “It’s better than Perl, but not as good as C#.NET” In other words, good, but not great. PHP has grown a lot since the early versions, and it really shows. Debugging PHP is like doing brain surgery with fork, there’s a lot of strange transformation functions (turn this associative array into independent variables!?) that add a lot of power, but tend to obscure the program flow.
Then I (re)learned Javascript and realized that just because a feature exists in a langauge doesn’t mean it needs to be used. Javascript is full of lots of little bad decisions that can be worked around or ignored. Just because the “with” keyword exists doesn’t mean I have to use it.
When I got back to PHP, I realized that it’s much the same thing. PHP places much of the responsibility to write clear programs on the programmer rather than taking that responsibility upon itself. Java is an example of a langauge that tries very hard to always be at least mediocre code—it may not be compact, but a coder has to go out of his way to obfuscate things—which hurts the language, in my opinion.
I would love to see PHP move toward a java-esque libarary include system. If not from a performance standpoint, from a sanity standpoint. It’s so much easier to debug and compartmentalize errors when you know where the error is coming from exactly with a clear stack trace.