Re:PHP Sadness
by kijin on Thursday November 29, 2018 @07:20AM
(#18559654)
You're probably thinking of in_array() and strpos(). Yeah, the names themselves are confusing, not just the order of arguments.
I wish PHP was fully object-oriented so you could call a method on any array, string, or number like in JavaScript. $haystack->contains($needle) is so much more consistent! That would eliminate the need for most of those confusing global functions, which can then be safely deprecated.
I wish PHP was fully object-oriented so you could call a method on any array, string, or number like in JavaScript. $haystack->contains($needle) is so much more consistent! That would eliminate the need for most of those confusing global functions, which can then be safely deprecated.