PHP is quite possibly one of the best languages to use for a project these days. The community is massive and full of people who are deeply passionate about best practices. There are more quality frameworks than you can hope to keep up with (if your ranking of quality is the meager toy that rails is, you'll be happy here). The frameworks are really good at abstracting away the awful API choices the language makes. That said, if you're writing in "PHP" instead of a given set of frameworks... you're working at a company that hired someone who wrote a lot of code with no experience of what makes a good system... but you'll soon find the JS looks exactly like that too, because that's not a PHP problem.