There are some plain-crazy things about this language, but there are also some plain-crazy things about other popular languages too. It's like we forget that JavaScript was absolutely reviled for over a decade. PHP is undergoing a JavaScript-like transformation, though it will never get that kind of popularity because of the lack of client-side browser usability.
Also, an exploitable XSS in your web application can be just as damaging as a server compromise.
I'm not a purist, if you're making money coding PHP more power to you. Around here there are a lot of businesses hiring people to make them Wordpress sites. But an aspiring dev asks me what language to learn I don't recommend it.
There's also some crazy defaults with json_encode which you actually need to send a flag to disable to get valid UTF-8. JSON_UNESCAPED_UNICODE, I am looking at you...interestingly enough they set the default to not cause buggy JSON parsers people use to blow up. Not a choice I would have made, but I guess they like to be nice to their users. It would be nice if their documentation for this function gave a more prominent message about this.
To address your second point though, I wouldn't advise that anyone learn _any_ language specifically. I would have them address concepts directly and try to be language agnostic. JavaScript would be the closest thing just for employability reasons, but it has way too many JavaScript-specific quirks for me to recommend someone to base their career on it.
I started out learning PHP on a LAMP stack on an old laptop, and reading C tutorials online. Probably my best move was working through SICP.
If they were math-inclined and weren't worried about immediate employability I'd recommend SICP even though Scheme is irrelevant in industry.
But if they wanted to make money as a web dev as fast as possible, JavaScript makes sense.
Ninja edit: yep. (http://asmblah.github.io/uniter/demo/interactive.html)
So you could run a PHP VM on top of a Javascript VM in PHP.
I'm sure you can learn a lot from PHP/Wordpress, but everything has opportunity costs. You can learn better from better languages and frameworks.
My shop does Python, Java, C and PHP. I know very good programmers who happen to write PHP for a living. They are the ones sneering at PHP the hardest.