Re: strcmp()?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 23 May 2011 14:28, Alex Nikitin <niksoft@xxxxxxxxx> wrote:
> There is an interesting note in the comments for strcmp:
> "Well, I am using PHP 4.0 and both strcmp and strcasecmp appear to be giving
> me very arbitrary and incomprehensible results. When I input strings, it
> appears that "equal" strings return "1", as well as some unequal strings,
> and that if the first argument is "smaller" then I *tend* to get negative
> numbers, but sometimes I get 1, and if larger I *tend* to get numbers larger
> than 1.. "
>
> Guessing that earlier versions of php 4 and before would give the results
> that would have values other then 1, 0, -1, i looked through the change log,
> but nothing immediately jumped out, there was a lot of mbstring work done,
> and they did add the nat comparison functions, and play with the pcre engine
> a bit, which could have caused this as an unintended result for a few
> versions, i think though it was a bug at some point, so, maybe a php dev
> would chime in if they remember...?
>
4.0.0 1 -1 1
4.0.1 1 -1 1
4.0.1 1 -1 1
4.0.2 1 -1 1
4.0.3 1 -1 1
4.0.4 1 -1 1
4.0.4pl1 1 -1 1
4.0.5 1 -1 1
4.0.6 1 -1 1
4.1.0 1 -1 1
4.1.1 1 -1 1
4.1.2 1 -1 1
4.2.0 1 -1 1
4.2.1 1 -1 1
4.2.2 1 -1 1
4.2.3RC1 1 -1 1
4.2.3RC2 1 -1 1
4.2.3 1 -1 1
4.3.0-pre2 1 -1 1
4.3.0RC1 1 -1 1
4.3.0RC2 1 -1 1
4.3.0RC3 1 -1 1
4.3.0RC4 1 -1 1
4.3.0 1 -1 1
4.3.1 1 -1 1
4.3.10 1 -1 1
4.3.11 1 -1 1
4.3.2-RC1 1 -1 1
4.3.2-RC2 1 -1 1
4.3.2RC3 1 -1 1
4.3.2 1 -1 1
4.3.3RC1 1 -1 1
4.3.3RC2 1 -1 1
4.3.3RC3 1 -1 1
4.3.3RC4 1 -1 1
4.3.3 1 -1 1
4.3.4RC1 1 -1 1
4.3.4RC2 1 -1 1
4.3.4RC3 1 -1 1
4.3.4 1 -1 1
4.3.5RC1 1 -1 1
4.3.5RC2 1 -1 1
4.3.5RC3 1 -1 1
4.3.5RC4 1 -1 1
4.3.5 1 -1 1
4.3.6RC1 1 -1 1
4.3.6RC2 1 -1 1
4.3.6RC3 1 -1 1
4.3.6 1 -1 1
4.3.7RC1 1 -1 1
4.3.7 1 -1 1
4.3.8 1 -1 1
4.3.9RC1 1 -1 1
4.3.9 1 -1 1
4.4.0 1 -1 1
4.4.1 1 -1 1
4.4.2 1 -1 1
4.4.3 1 -1 1
4.4.4 1 -1 1
4.4.5 1 -1 1
4.4.6 1 -1 1
4.4.7 1 -1 1
4.4.8 1 -1 1
4.4.9 1 -1 1

All the official versions of PHP 4 (and some RCs) for Windows.

All give the same response.

Must me a platform issue also.
-- 
Richard Quadling
Twitter : EE : Zend : PHPDoc
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux