Re: [PHP] Strange comparison behaviour

2005-05-14 Thread Richard Lynch
On Fri, May 13, 2005 1:18 am, Erwin Kerk said: > Can anyone explain me why the following code: > > if ("info" == 0) echo "is 0\n"; else echo "not 0\n"; > > Results in: not 0 > > > Whereas: > > if ("inf" == 0) echo "is 0\n"; else echo "not 0\n"; > > Results in: is 0 > > Notice the difference: info i

[PHP] Strange comparison behaviour

2005-05-13 Thread Erwin Kerk
Hi All, Can anyone explain me why the following code: if ("info" == 0) echo "is 0\n"; else echo "not 0\n"; Results in: not 0 Whereas: if ("inf" == 0) echo "is 0\n"; else echo "not 0\n"; Results in: is 0 Notice the difference: info in the first sample, inf in the second sample. The used PHP version