[wp-docs] Boolean values: 1/0 or true/false

Kitty kitty at mookitty.co.uk
Thu Dec 16 08:08:54 UTC 2004


On Thu, 2004-12-16 at 01:01, Joshua wrote:
> Is there any difference between boolean values 1/0 and
> true/false? If not, I'm gonna note valid values as
> true/false in all template tags, whether the source
> code says 1/0 or true/false. What do you think?

Yes, sometimes '0' is valid input, think array indexes, etc.
True/false is *always* the best way to go in PHP.
-- 
Cheers,		     Blog: http://blog.mookitty.co.uk
Kitty		     PC Repair: http://www.girltech.net
		     WP Plugins: http://mookitty.co.uk/devblog
Support proactive security: http://www.openbsd.org/orders.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : /pipermail/docs_wordpress.org/attachments/20041216/e2377eb2/attachment.bin


More information about the docs mailing list