Reducing the cost of your project is a pretty good reason to choose something. Which template language would you choose for those other platforms? One of 200 half-baked templating languages, or something more complete like php?
PHP has better documentation than all of those platforms, so that could be another reason. It has more advanced, popular, and featureful Content Management Systems than all of those platforms.
Python docs are way better on a technical level IMO (more detailed, more accurate - if you want to know what a function does in PHP you need to spend hours reading through the massive comment threads to find the corrections, and then ignore the comments from years ago since the API changed and the comments didn't, etc etc); but much like the rest of PHP, the PHP docs are incredibly convenient - php.net/function_name will go direct to the docs for that function if it's unique, or search for function_name in all libraries if not.
This is really useful when your standard library is an incredible cockup of str_pos vs strpos vs string_pos vs sposition vs StrLib::Position vs ($haystack, $needle) vs ($needle, $haystack) - it means you only need to spend a few seconds double-checking the docs every time you use a standard library function.
Sure, a library which was consistent and thus needed no lookups at all would be better, but if you abandon all hope of making sense of it and understand that you'll need to use the documentation several times per line of code, the convenience of the docs makes it not quite so painful.
No serious PHP developer actually go to php.net to read the documentation, literally all of the big PHP editors/IDEs come with an embedded manual so when you write strpos( it automatically tells you the order of variables.
If I really had to go to php.net to look up order of variables or even a function name then I wouldn't be programming in PHP at all, would take too long. Thankfully, since I'm not restricted to notepad I don't have to worry about this aspect.
Yeah, this is me too. I haven't done much PHP in the past year, but when I did, PHP.net was ALWAYS open in a tab or two. There was NO WAY you were gonna get me to use some bloated nasty Java based editor just to have code completion. Honestly though, Stackoverflow is my goto point if I want the better parts of php documentation comments. An answer with 7 or more votes is worth taking a look at.
Sorry have to quibble on that last sentence. I'm transitioning from PHP to Python at the moment and I constantly keep thinking "jesus, I wish docs.python.org was as good as php.net".
In what sense? I feel it's better than PHP's docs (tutorial, index, module list, everything.) Besides, you rarely ever need to look at the docs. `help(...)` works well enough 99% of the time.
Method and module names are clear and easy to guess. If I remember PHP well enough, it was a sorry_mess_of_underscored_function_names (with no namespaces) and had $funky $dollar $signs before variables. Some of the functions worked one way, some of them worked in another way (I mean that similar functions didn't work the same way.) Don't get me started on the type coercion system and the equality operators (among other things.)
EDIT: Quite a few people have mentioned that it's easy to deploy PHP software and while that might be true, (as I remember it from when I used to develop in PHP) it's much harder to set up a PHP environment than a Python one. Some of PHP.ini's defaults are (were) horribly broken, Apache has (had) problems finding PHP, etc. In contrast, setting up a Python/WSGI environment is like a breeze.
I miss the user contributed notes. I miss the way you can drill down on the left hand side of the screen. I miss the multitude of quick examples embedded alongside the documentation (py docs has some but not nearly as many). I find the descriptive language used more approachable and easier to understand. I also prefer the general look and feel.
To answer your second point about deployment: regarding your ini file, you set this up once how you want it to be and then use that across all your projects. Not very hard. As for apache, I don't know what you were doing but in my experience it's almost impossible for apache not to find php. I've just setup uWSGI (plus emperor) + mongrel2 + Flask (in a virtualenv) and that is 100 time harder to get going than apache and mod_fcgid (IMHO).
PHP has better documentation than all of those platforms, so that could be another reason. It has more advanced, popular, and featureful Content Management Systems than all of those platforms.