You are here: Re: Who thought this was a good idea? « PHP Programming Language « IT news, forums, messages
Re: Who thought this was a good idea?

Posted by Michael Winter on 10/04/63 11:18

On 11/06/2005 11:35, Paul Wellner Bou wrote:

> Chris Hope wrote:

[snip]

>> When comparing a string with a number the string is first evaluated as a
>> number, which in the case of the above is example is 0. So in effect
>> you are comparing 0 with 0.
>
> Sorry, this is not correct.

Unless the documentation is wrong, it certainly is correct.

From Comparison Operators:

"If you compare an integer with a string, the string is converted to
a number."

and from Strings:

"If the string starts with valid numeric data, this will be the value
used. Otherwise, the value will be 0 (zero)."

[snip]

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.

 

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

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