IMHO PHP get's treated fairly. It's possible to write secure and well designed programs in it, it's just very hard. And in fact I'd argue that half of the internet does not work. We life in a world where zerodays are ubiquities.
I just think that languages like c and especially c++ do not get their fair amount of laughter, that php gets.
"It's 2015, there are not "security issues around hosting php applications" otherwise half the internet wouldn't work."
PHP adds complexity and therefore adds fragility and insecurity. Running PHP ipso facto adds insecurity to an environment.
There are many ways to do web programming that do not add server daemons or listening ports, or long running processes, or additional logins, passwords and management interfaces.
There does seem to be a "cargo cult" attitude to PHP amongst a large part of the tech sector.