Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Be Careful With Converting Boolean Values!!

DZone's Guide to

Be Careful With Converting Boolean Values!!

·
Free Resource
// 



php> $v = 'FALSE'

php> var_dump((bool)$v)
bool(true)

php> $v = 'false';

php> var_dump((bool)$v)
bool(true)

php> $v = '0';

php> var_dump((bool)$v)
bool(false)

Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}