There was a tech talk I saw on Youtube a few years ago that I really liked that argued that Facebook succeeded because of PHP, not despite it.
IIRC, the main argument was that despite its flaws, PHP has one killer feature, which is that it lets you have really tight iteration loops for web development. This made developing in PHP extremely productive.
I searched around for the video, but couldn't find it.