If [language of your choice] was as popular as PHP you can bet that there would be thousands of poorly written sites in that language out there too.
I sincerely doubt that. PHP has fundamental issues.
It's like the people 10 years ago saying "if [other OS] was as popular as Windows XP, it'd be overrun with malware too". No. The issue wasn't Windows marketshare, it was the completely crap security.
Re:PHP Sucks But I Like It
by chunkybacon on Thursday April 12, 2012 @09:36AM
(#3832219)
The issue was both Windows marketshare and crap security. If it wasn't easy to write malware for Windows not as many would write it. If there was no one to infect with the malware, also no one would write it.
PHP is a reasonable templating language. That's what it should be used for.
If you use a framework, you're golden, but at that point you could be using any language.