(08-10-2008 07:54 AM)PsychicAltaria Wrote: I saw this thread, and was like, "Oh, gosh, what is Faltzer (Definitely not Silverwing (Definitely not Faltzer)) going to say about PHP this time?"
You're on the right track.
Quote:Dude, what is so bad with PHP. IT WORKS FINE!
According to your logic, you're saying that you will use Internet Explorer over Firefox because IE "WORKS FINE!", am I correct?
There are so many built-in functions that the reference has been changed from a flat list to one-hundred eighty categories of functions.
There are at least 22 functions alone for finding something in a string, depending on if you want to be case insensitive, if you want to replace that something, if you want to search from the end first, etc etc... some of those functions also have flags, which is a bit self-defeating.
To the best of my knowledge, the built-in database access functions don't use or even allow the use of variable binding, which is possibly why I hear about so many common PHP applications with SQL injection exploits. There are, of course, several different ways to get around this, including a flag in a config file that affects every script on the whole server and a function named mysql_real_escape_string. (I eagerly await the announcement of mysql_fake_escape_string.) There are also dbx_escape_string, escapeshellarg, escapeshellcmd, pg_escape_bytea, pg_escape_string, pg_unescape_bytea, addslashes, addcslashes, preg_quote, quotemeta, mysql_escape_string, mysqli_real_escape_string, and sqlite_escape_string. Why? Who knows?
The reflectiveness API looks absolutely nothing like the rest of the language and actually more closely resembles a failed attempt at wedging Java into C.
The developers can't even decide whether or not they want underscores in function names or not. is_object vs isset? base64_encode vs urlencode? str_rot13 vs strpos? Straightforward indeed.
Arrays and hashes, despite being completely different, are merged into the same data structure because I guess it would just be hard to expect new programmers to tell the difference. Teaching by removing difficult details; what a concept.
Does PHP even have references or namespaces or closures yet? I don't think so, really.
I'm not a fan of having the same operators for numeric and string operations either, but almost everyone does that
Bad programs do not a bad language make, but there have to be some criteria for a bad language, and I'm pretty sure these should all be on the list. PHP started out as a quick templating language for non-programmers, and it's still not very good for anything better than that. I could write a symbolic algebra package in Malbolge, but that doesn't make it a good idea.
PHP is a horrible language for a new programmer and a pathetic language for a seasoned programmer. If you want a decent language also aimed for beginners, use Python. If you want a powerful language with vaguely-consistent syntax and lots of easy-to-use libraries, use Perl or Python or Ruby. If you want to put a cute little counter in otherwise-static HTML, use PHP.
Quote:I've dabbled in Perl, Python, and Ruby, and I still like PHP. So shut up about it already, k?
No.