I personally like PHP quite well, but I have seen much dislike for PHP on forums, IRC channels etc. So now I have asked a little around to find out what’s wrong with PHP…
The naming of functions seem to cause much hatred. Why is it called str_shuffle(), str_repeat() and str_replace(), but strlen(), strpos() and strrev()?
The order of parameters also seem to piss people off, for instance array_filter ( array $input [, callback $callback ] ) and then we look at array_map ( callback $callback , array $arr1 [, array $... ] ). Doesn’t make sense.
The need to use cURL if you need to work with cookies.
The use if php.ini where you can set magic_quotes, register_globals and safe mode on / off does not make the code very portable. Say you write a program with safe mode = on in the back of your head and then the program are used on another server with safe mode off…
And then we have PEAR as quoted on a dude at reddit.com “Oh, and then there is PEAR. Hey, I’d like to install 5,000 buggy libraries on my website.”
And there is the dollar sign ($) which seems like waste of space, the lack of the opportunity to use threads and it’s easy to write bad and sloppy code, while other languages forces the user to write better code.
But the main reason I personally think is that there are some many people learning PHP as their first language (including myself) and then the language is associated with newbies.
