Destructionator XIII wrote:PHP was (and is) created by morons for morons. Fundamental technical flaws are the least of its problems. Greater is that the idiots around it don't see them as flaws.
Perhaps one of the few good things about PHP is that it does scale very well (as mentioned earlier) - but that is in spite of its many problems.
Chris OFarrell wrote:Its free, and it has been the mantra of a lot of geeks that Apache + PHP = Liberation...or something.
PHP was early, free, cross-platform and relatively easy to understand. There were not many alternatives when it was created (CGI scripts and Perl come to mind). Nowadays there are many alternatives - but PHP lets you get your feet wet early and is deceptively simple.
Xon wrote:Mysql and secure? Don't make me laugh.
mysql_real_escape_string doesn't protect against against SQL injection properly with dynamic sql even ignoring unicode!
Linky.
IIRC, most security sites specifically advice users
not to use *escape_string for sanitizing. Also, MySQL is terrible - too bad Postgres made some bad decisions back in the day and let MySQL take the market.
Starglider wrote:Quite a lot of programming languages are someone's personal crappy scripting language that somehow escaped and gained popularity. These are kludged together with no real understanding of language, compiler or library design, and they universally suck. Perl is in this category despite massive efforts put in for over a decade to try and make it into a real language (why anyone would want to, I don't know).
Perl came early with the right features and the right price at the right time. Plus, there was strong demand for something to do string parsing and munging. Of course, now there's so much legacy code and so many Perl gurus they want "sane" Perl.
These languages are attractive only because they seem simple and easy to pick up. In actual fact, all the 'counterintuitive' and complex features in other languages are generally there for a reason. Furthermore there are now plenty of properly designed languages that target simplicity and beginners, so really there is no excuse for using junk like PHP except having to maintain legacy code.
Yeah, but it's popular, free and cross-platform so new people see it and dive right in.