PHP is a fine language and all but I'm finding Java and Scala to be better for many reasons, type-safety and thread-safety among the biggest reasons. Scala is nice because the syntax is clean and it allows you to program in the functional paradigm which allows for highly reusable code among many other benefits. The JVM does exceptionally well with RESTful web apps. I find that I like programming for the JVM much better than PHP.
I think it's also important to add that perhaps the reason PHP is so widely used isn't because it's the best option. It's probably one of the easiest languages to learn as a beginner because it's so basic. The LAMP stack isn't bad, but it's rather slow unless you make some optimizations.
Another thing that someone failed to mention is that, Facebook had to create their own compiler to reduce PHP down into C++ byte code because it was so slow and scaled so poorly. This is called hPHP (the HipHop Virtual Machine) and they faced a lot of challenges and spent a lot of money to create it. The only reason they stuck with PHP was because they didn't want to introduce instability in switching languages. Most new big services aren't being written with PHP for good reasons.
|