2 ms·
> I mean, come on, who would ever name a function "real", and why? While that's a great question, the answer is "not the people who wrote PHP": https://dev.my
by chipotle_coyote 6y ago
> I mean, come on, who would ever name a function "real", and why?
While that's a great question, the answer is "not the people who wrote PHP":
https://dev.mysql.com/doc/refman/5.5/en/mysql-real-escape-string.html https://dev.mysql.com/doc/refman/5.5/en/mysql-real-escape-st...
PHP has its issues (boy howdy), but sometimes those issues are being propagated from other places.
Also, I'm gonna (very gently) push back on "evangelizing it then not fixing it," at least with respect to this particular boy howdy issue. PHP may have been late to get on board with bindings and basic DB abstraction, but they've had PDO since 2004. There are a lot of things like this in PHP -- big problems with its original conception/implementation that have been tackled in later iterations of the language, but that people seemingly won't forgive either because they're offended the sins were committed in the first place or because PHP preserves the stupid ways to do things for years and years in the name of backward compatibility.
(I mean, I don't want to overstate anything here. PHP basically started out as a cargo cult version of Perl, and the PHP community collectively decided a few years ago that the proper thing to do to move the language forward was to turn it into a cargo cult version of Java which seems, well, debatable.)