2 ms·
I personally don't object to 'trivial' functions sprinkled in my stdlib. I mean your own comment already highlights it, the return value of strstr() and strpos(
by Cthulhu_ 6y ago
I personally don't object to 'trivial' functions sprinkled in my stdlib. I mean your own comment already highlights it, the return value of strstr() and strpos() is not intuitive, whereas you expect a boolean for a 'contains()' function.
Of course, it also highlights one of PHP's often repeated criticisms, that of function naming inconsistency.