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 Toby A Inkster on 01/07/08 01:16

Iván Sánchez Ortega wrote:

> In PHP, a boolean is different than an integer.

PS: if you want to use integer bools in PHP, it's very easy to define them
yourself...

define('_TRUE_', 1);
define('_FALSE_', 0);

echo _FALSE_; // 0
echo _TRUE_; // 1
echo _FALSE_ & _TRUE_; // 0
echo _FALSE_ | _TRUE_; // 1

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.17.14-mm-desktop-9mdvsmp, up 7 days, 12:27.]

New BBC Home Page
http://tobyinkster.co.uk/blog/2008/01/07/bbc-home-page/

 

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

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