[TYPO3-core] RFC: Feature #4064 - Navigation title in tree view
Ernesto Baschny [cron IT]
ernst at cron-it.de
Wed Sep 5 14:30:05 CEST 2007
Ingmar Schlecht wrote: on 05.09.2007 10:47:
>> I have stumbled over the same question in my previous patch! I usually
>> dislike strcmp because it is very unintuitive when reading. The "==="
>> comparison is more my style and much easier to read. Is it slower? More
>> error prone? If not, I would stick to that.
> The problem with === for string comparisons is that
> 123 === '123'
> returns false, whereas
> !strcmp(123, '123')
> returns true.
>
> So there is a little difference between the two which sometimes makes it
> handier to use strcmp.
This is exactly why I would *use* === instead of strcmp, because I want
to compare a string with a string. If I don't want that, I can use "=="
and also don't need strcmp.
Cheers,
Ernesto
More information about the TYPO3-team-core
mailing list