News for hackers. Stuff that matters.
Re:Announcing a specification for PHP by randomdrake on Thursday July 31, 2014 @12:12AM (#8112423)
> the only real reasonless difference is string functions are haystack / needle, whereas array functions are needle / haystack

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.

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?

Re:Announcing a specification for PHP by cglace on Thursday July 31, 2014 @10:33AM (#8114303)
The order of the words.