There does seem to be a "method to the madness" in the parameter order of PHP's built-in functions.
For array functions the order is (needle, haystack).
For string functions, the order is (haystack, needle).
Written by on May 19, 2011
There does seem to be a "method to the madness" in the parameter order of PHP's built-in functions.
For array functions the order is (needle, haystack).
For string functions, the order is (haystack, needle).
array_key_exists( mixed $key , array $search )
stripos ( string $haystack , string $needle [, int $offset = 0 ] )
Pingbacks are closed.
Comments
Comments are closed.