When I cast to Boolean (using (bool)
), is there a built in way to get PHP to actually return the constants true
or false
. At the moment I'm getting 1
or blank, which evaluate to true and false respectively.
I want the value returned for clearer semantics. However, if I can't get it, I'll just settle with 1 and blank.
Update
I've realised this question is a bit... stupid. I mean even if I return true or false, they'll evaluate to 1 or blank anyway. I definitely do not want strings! :)
Sorry to waste anyone's time.