PHP Sadness

Order of arguments (array/string search)

Decide on an argument order!

int strpos  ( string $haystack  , mixed $needle  [, int $offset= 0  ] )

string stristr ( string $haystack , mixed $needle [, bool $before_needle = false ] )

bool in_array  ( mixed $needle  , array $haystack  [, bool $strict  ] )

mixed array_search  ( mixed $needle  , array $haystack  [, bool $strict  ] )

Significance: Consistency

Language consistency is very important for developer efficiency. Every inconsistent language feature means that developers have one more thing to remember, one more reason to rely on the documentation, or one more situation that breaks their focus. A consistent language lets developers create habits and expectations that work throughout the language, learn the language much more quickly, more easily locate errors, and have fewer things to keep track of at once.