What's driving your zealous PHP advocacy?
PHP has lots of add-ons that make it very powerful like: PHPExcel for churning out a spreadsheet, TCPDF for creating a PDF, PHPMailer for sending an email, etc. I don't know if other languages have these but they are simple to use in PHP.
It is true you can write a crappy application with security holes like swiss cheese in PHP. But you can do that in any language. If you're going to write 'good' programs there are quite a few web principles like sanitizing input that you MUST learn.
On the other hand, I think one of the flaws of PHP is that it is often co-mingled with HTML. This makes it hard to debug. A better approach, I feel, is to turn PHP on in the first line and don't turn if off until the last line. If you want to send some HTML, use an echo statement. Learn to use loops (for, foreach, while, etc.), give variables meaningful names, and create functions for things you do over and over.