Re: Regex in PHP

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

 



On Wed, Jun 4, 2008 at 10:10 AM, Richard Heyes <richardh@xxxxxxxxxxx> wrote:

> Hi,
>
>  and the case insensitive versions are a hair faster still ;)
>>
>
> Are they? I always thought that case-sensitive functions were faster
> because they have to test fewer comparisons. Eg To test if i == I in a
> case-insensitive fashion requires two comparisons (i == I and i == i)
> whereas a case-sensitive comparison requires only one (i == i).


umm, isnt it like the other way around.  in the case of case-sensitive, you
have to be able to distinguish between i and I, whereas w/ the case
insensitive, you dont care so, basically, you strtolower() first thing, then
just compare to lower case characters.

-nathan

[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