3 ms·
These advantages are not unique to PHP. Perl, Python, and Ruby allow you to "just save the file and reload in your browser to see a change." They can be insta
by reality_czech 11y ago
These advantages are not unique to PHP. Perl, Python, and Ruby allow you to "just save the file and reload in your browser to see a change." They can be installed via apt-get (although Python always had cross-version compatibility problems.) And these languages are a lot more usable than PHP once your application grows beyond a hundred or so lines. That's why people refer to PHP as "training wheels without the bike."
What does "being written expressly for the web" mean in the context of PHP? Does it mean they implemented a taint mode like Perl, where you could sandbox untrusted user input. Well... no. Did they implement defenses against common web vulnerabilities like SQL injection? Not really. In fact, a lot of the built-in string escaping functions in PHP are seriously broken and will lead to security vulnerabilities if you use them. Is it part of a bigger web framework like Ruby on Rails? Nope. As far as I can tell "being written for the web" is just marketing.
- gozo 11y ago"Did they implement defenses against common web vulnerabilities like SQL injection?" Prepared statements has been available with PDO since 2005. It might very well have had bugs, but that isn't uncommon.
- reality_czech 11y agoYes, it's possible to write secure code in PHP. Just more difficult than in other languages because you are fighting against the design of the language.