You are here: Re: TRUE and FALSE are treated differently « PHP Programming Language « IT news, forums, messages
Re: TRUE and FALSE are treated differently

Posted by Rik Wasmus on 01/06/08 18:43

On Sun, 06 Jan 2008 19:26:30 +0100, A Bit Narked <anonymous@example.com>
wrote:
> The whole idea of symbolic constants is that they are always
> replaced by the underlying value during translation, and thus
> *anywhere* you would otherwise have to use some obscure "magic
> number" such as 191, you can use a symbolic constant that makes
> sense in your context, such as TOTAL_NATIONS.

Ah, taking a closer look at your post, I'd say this: you cannot echo true
or false, they have no string value. PHP has loose typing, and false cast
to string would be '', cast to integer would be 0, the fact is that the
underlying value of false is not 0 (yes, it would be in C probably, but
not from the PHP side of things).
--
Rik Wasmus

 

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

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