3 ms·
"Messy Api" isn't just parameters. For instance "Fatal" errors and regular errors going to two different logs was very messy and would byte you if you didn't pa
by hrktb 7y ago
"Messy Api" isn't just parameters. For instance "Fatal" errors and regular errors going to two different logs was very messy and would byte you if you didn't pay special attention to it.
Or multi-byte compliant methods that are a variants, and not the standard method, thus biting anyone who just thought utf-8 would be default.
"terrible default": the poster child for this is register globals, which it took ages to have off by defaults. That's just a single line to set it properly, but that was part of the boilerplate that could have been avoided way earlier.
Overall developing for PHP meant to defensively remember a ton a weird stuff, just like javascript was for a while. I am so glad we mostly got past that, even if I am not in PHP anymore.
- lucideer 7y agoFatal errors is fair enough; though I only ever experienced this with parse errors, PHP being stateless did make this less likely to be caught until well into runtime, so it could be an issue. String encoding though is, again, something other languages had similar gotchas with. Remember we're comparing PHP to its popular alternatives at the time, not to our hypthetical ideal runtime. The bad defaults you and a sibling commenter are referring to (magic quotes) are, again, from 11 years ago. Sure, 15 years ago PHP had serious issues, but here we are today acting as if they didn't fix most of them over a decade ago.
- catach 7y ago> but here we are today acting as if they didn't fix most of them over a decade ago. Recall that the defense of PHP in this tree leads with "There was never anything wrong with PHP, really."
- imron 7y ago> The bad defaults you and a sibling commenter are referring to (magic quotes) are, again, from 11 years ago. That's because the context was the state of PHP 15 years ago.