What do haystack and needsles in php mean?
Baidu checked the translation of these two words, but I don’t understand why PHP has these English names?
淡淡烟草味2017-05-17 09:57:17
haystack
的意思是草垛needle
means needle
In fact, I found that these two words basically appear in functions related to search.
I think it should be a metaphor for finding a needle in a haystack (you have to find despair). Show that this function is awesome = =
淡淡烟草味2017-05-17 09:57:17
needle in a haystack
/ Looking for a needle in a haystack is an English proverb, which is equivalent to "finding a needle in a haystack" in Chinese
天蓬老师2017-05-17 09:57:17
Thanks for the invitation!
eg: strpos($haystack, $needle);
$haystack (haystack) is the search character sequence, $needle (needle) is the content to be searched in $haystack. So it can be interpreted as Find a needle in haystack
,就是楼上说的大海捞针
, difficult to find.