Re: OT : filtering the aioe spam
- From: Rami Elomaa <rami.elomaa@xxxxxxxxx>
- Date: Thu, 31 May 2007 16:56:55 +0300
Schraalhans Keukenmeester kirjoitti:
Which makes me wonder why there's such a loose definition of the retval, and what is actually stored in it inside
the func.
Perhaps in a future version of php they want to make it return some sort of number to indicate how much they are different. Or maybe they find out that returning -99999 is faster than -1... Perhaps in the future strcmp('abc','abd') might return 1, because only one letter is different, but strcmp('abc','xyz') would return something completely different. If they keep the definition loose, they can improve the code in the future, without breaking backwards compatibility. This means that a script that now tests if(strcmp($foo,$bar)<0) works now for -1, but it will also work for -42. It's all about reserving the possibility for future improvements.
--
Rami.Elomaa@xxxxxxxxx
"Wikipedia on vähän niinq internetin raamattu, kukaan ei pohjimmiltaan
usko siihen ja kukaan ei tiedä mikä pitää paikkansa." -- z00ze
.
- References:
- OT : filtering the aioe spam
- From: Schraalhans Keukenmeester
- Re: OT : filtering the aioe spam
- From: Toby A Inkster
- Re: OT : filtering the aioe spam
- From: Schraalhans Keukenmeester
- OT : filtering the aioe spam
- Prev by Date: PHP/mySQL Forum/BBoard Recommendations
- Next by Date: Re: To OOP or not to OOP
- Previous by thread: Re: OT : filtering the aioe spam
- Next by thread: Re: OT : filtering the aioe spam
- Index(es):