title: Why are parameters in array functions are in different order than in string functions?
body: <p>I was always wondering why in PHP array function we have <code>$needle</code> before the <code>$haystack</code> and vice versa in string functions. E.g.:</p>
  
  <pre><code>mixed array_search ( mixed $needle , array $haystack [, bool $strict = false ] )
  bool in_array ( mixed $needle , array $haystack [, bool $strict = FALSE ] )
  
  string strstr ( string $haystack , mixed $needle [, bool $before_needle = false ] )
  int strpos ( string $haystack , mixed $needle [, int $offset = 0 ] )
  </code></pre>
  
  <p>Is it another PHP sadness or there is some sort of logical explanation for this?
  The thing is I often can't remember which one is in what order - maybe that logic beyond this will help.</p>