3 ms·
I work on a modern PHP 7.1 codebase, and I personally disagree: > PHP's problem IMHO is that I wouldn't be able to use it if it wasn't for autocomplete: incons
by Lazare 9y ago
I work on a modern PHP 7.1 codebase, and I personally disagree:
> PHP's problem IMHO is that I wouldn't be able to use it if it wasn't for autocomplete: inconsistent function names, inconsistent parameter order.
I know the functions you're talking about, and they're definitely a wart, but approximately 0% of my day is spent actually calling them directly. I spent a lot of time working with eg, collection classes which extend a base collection class which, sure, calls one of the interchangable array_* functions with their endlessly inconsistent parameter order, but I'm not calling them. Similarly, a lot of code I write every single day relies on encoding and decoding HTML entities, and yes, the fact that it's html_entity_decode and htmlentities is certainly embarrassing, but again, it's all handled by a library.
It's an issue, but I'm not sure I'd find room for it on a top 10 list of issues with PHP. How about, say, the lack of generics? Now that's a flaw that actually impacts people using PHP professionally, whereas the htmlentities/html_entity_decode thing, in my experience, doesn't.
- nkkollaw 9y agoI get what you're saying but your point is that inconsistencies with PHP aren't a problem because you use libraries instead of core functions. That doesn't make core functions awesome, it's just that in your case you don't use them.