You are here: Re: OT : filtering the aioe spam « PHP Programming Language « IT news, forums, messages
Re: OT : filtering the aioe spam

Posted by Rami Elomaa on 05/31/07 13:56

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@gmail.com

"Wikipedia on vähän niinq internetin raamattu, kukaan ei pohjimmiltaan
usko siihen ja kukaan ei tiedä mikä pitää paikkansa." -- z00ze

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация