Re:Announcing a specification for PHP
by colordrops on Thursday July 31, 2014 @02:50AM
(#8112782)
> searching for a needle in a haystack
> searching in a haystack for a needle
wait, what's the difference?
There's a trick to this that isn't too hard to remember. Searching for a value in an array is much more akin to searching for a needle in a haystack.
So, for array functions, it's like searching for a needle in a haystack. For string functions, you're searching in a haystack for a needle.
I'm not really commenting on whether one should have to remember this, only that it helps if you need to remember it.