search

Home  >  Q&A  >  body text

What do haystack and needles in php mean?

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?

某草草某草草2838 days ago1355

reply all(3)I'll reply

  • 淡淡烟草味

    淡淡烟草味2017-05-17 09:57:17

    haystack的意思是草垛
    needlemeans 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 = =

    reply
    0
  • 淡淡烟草味

    淡淡烟草味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

    reply
    0
  • 天蓬老师

    天蓬老师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.

    reply
    0
  • Cancelreply