just was debugging the Zend_Search_Lucene UTF-8 issue with PHP. I found some advice to play with

setlocale(LC_CTYPE,'de_DE.UTF8');

okay, but before doing so, I would like to see the setting on my dev-env where it works fine and on the test server, where it does not.
okay:

echo getLocale(LC_CTYPE);

hmm … does not work? okay, lets check the API for setlocale:

string setlocale ( int $category, string $locale [, string $...] )

If locale is “0″, the locale setting is not affected, only the current setting is returned.

Returns the new current locale, or FALSE if the locale functionality is not implemented on your platform, the specified locale does not exist or the category name is invalid.

are they nuts? I expected the setter to return the value it just set for convenience, fine. But it can also return false. So please indicate it with mixed that you can get different return types.
But what I consider an even bigger flaw in design is that you have to pass a String which has to be “0″ to make the function work like a getter.
Thats not medieval programming. That is stoneage API design.

I better go and search for that problem now :-)