Well you just lack experience if this is your biggest pet peeve. I agree, it's not a perfect system, but if you only pass an array to array filter it will filter out falsey values without you having to specify a callback. There's benefit in that
this is not the biggest but it's the context of what I replied to.
and if array_filter have benefit of using array first, why not all other functions do the same?
Either way, if you are coding in anything other than Notepad, your IDE will most likely help you with the argument order so in that regard, it really is a moot point. Most frameworks have all of this abstracted already. They also abstract strings. I don't see it being much different than Java world. Nobody codes in plain Java nowadays. Everybody simply learns the spring framework and "the spring way of doing things" and that is it.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
example from built-in function of core php
array_map receive callback first, array second
array_reduce receive array first, callback second
there are quite a number of this kind of inconsistency around
Well you just lack experience if this is your biggest pet peeve. I agree, it's not a perfect system, but if you only pass an array to array filter it will filter out falsey values without you having to specify a callback. There's benefit in that
this is not the biggest but it's the context of what I replied to.
and if array_filter have benefit of using array first, why not all other functions do the same?
Either way, if you are coding in anything other than Notepad, your IDE will most likely help you with the argument order so in that regard, it really is a moot point. Most frameworks have all of this abstracted already. They also abstract strings. I don't see it being much different than Java world. Nobody codes in plain Java nowadays. Everybody simply learns the spring framework and "the spring way of doing things" and that is it.