3 ms·
its fun to trash talk PHP who cares if statements are accurate. PHP sucks because of the dollar signs everywhere. From a distance Wordpress code looks like Nige
by eggsnbacon1 6y ago
its fun to trash talk PHP who cares if statements are accurate. PHP sucks because of the dollar signs everywhere. From a distance Wordpress code looks like Nigerian Prince emails.
And crazy coding conventions like mysql_real_escape_string. Really PHP?
- hu3 6y ago> From a distance Wordpress code looks like Nigerian Prince emails. And crazy coding conventions like mysql_real_escape_string. Really PHP This is good stuff. And correct. I'd love to hear that during an interview. Although mysql_real_escape_string() is not really used anymore nor condoned last I checked. > PHP sucks because of the dollar signs everywhere Now this is just an opinion. No bueno my friend.
- cafard 6y agoActually, what I dislike about PHP's dollar signs is that the make it look like Perl, but they are tacked on to lists and hashes also.
- Carpetsmoker 6y agoI suspect the dollar signs may be part of the reason of PHP's success. While it's clear for experienced programmers that "x" and "y" are variables and "foo" is a function in "x = foo(y)", for new programmers "$x = foo($y)" is probably easier to read and mentally parse. That is my personal experience anyway, as someone whose first truly serious language was PHP 20 years ago. Maybe it was just because I was used to it (BASIC also used $), but it took me a bit to get used to the "bare" variables in Python and C back in the day.
- aries1980 6y agomysql_real_escape_string() comes from the MySQL C library binding: https://dev.mysql.com/doc/refman/8.0/en/mysql-real-escape-string.html https://dev.mysql.com/doc/refman/8.0/en/mysql-real-escape-st...
- eggsnbacon1 6y agothis actually makes sense. Maybe I was wrong about PHP. But maybe not :)