3 ms·
>> Quick to bash out a simple site. > This is precisely why I don't think it's the appropriate tool for any substantial, serious, or long-lived projects This
by muglug 7y ago
>> Quick to bash out a simple site.
> This is precisely why I don't think it's the appropriate tool for any substantial, serious, or long-lived projects
This is precisely why it is an appropriate tool - those simple sites become more complicated, and eventually they're Tumblr or Etsy or Wikipedia or what-have-you.
> it feels like the language actively empowers code to be written this way.
I've felt the same thing, especially early on. I think there are two reasons:
- a lack of a compile step means you're never forced to conform to someone else's idea of how your code should work (though running a static analysis tool fixes this).
- additionally, PHP's interpreter is designed to soldier on in situations where other runtimes would exit (e.g. when it encounters an undefined variable or array offset). While I can imagine justifications for this behaviour, it allows for a lot of bad code.