Boolean issues in PHP
Posted
by McNabbToSkins
on Stack Overflow
See other posts from Stack Overflow
or by McNabbToSkins
Published on 2010-04-20T14:28:34Z
Indexed on
2010/04/20
14:33 UTC
Read the original article
Hit count: 318
I have a question regarding bools in php. I have a stored mysql proc that is returning a boolean. When this value is grabbed on the php side it displays the value as being a 0 or 1. This all seems fine to me and I have read in the php manual that php will interpret a 0 or 1 as false or true at compile time but this does not seem to be the case to me. I have gone a step further and casted my returned value with (bool) but this still does not seem to work.
My if statements are not properly firing because of this. Does anyone know what is going on? Thanks for the help.
© Stack Overflow or respective owner