Oh please don't get so flamewar-y. Admittedly PHP does require some more discipline than most languages and it doesn't look the most elegant, but there are certainly plenty of reasons to use it.
I'll give the example of an internal system I develop for an IT company. Technically, it could be written in whatever, but they explicitly wanted PHP, as do a great many businesses. Why? Because PHP is after plain HTML the absolute simplest to make a server for and if you want to host it externally, it's still simple and really cheap.
There is plenty of demand for PHP for other reasons, and these days, most of these codebases won't even be horrible spaghetti
I'll give the example of an internal system I develop for an IT company. Technically, it could be written in whatever, but they explicitly wanted PHP, as do a great many businesses. Why? Because PHP is after plain HTML the absolute simplest to make a server for and if you want to host it externally, it's still simple and really cheap.
There is plenty of demand for PHP for other reasons, and these days, most of these codebases won't even be horrible spaghetti