Boolean Function Return Values 
Unless there is a good reason to use 1/0, such as the possibility of a return value of 2, use true/false as return values for functions.
function is_three($var)
{
    if ($var == 3)
    {
        return 1;
    }
    else
    {
        return 0;
    }
}

function is_three($var)
{
    if ($var == 3)
    {
        return true;
    }
    else
    {
        return false;
    }
}
Use lower-case true/false rather than upper-case TRUE/FALSE. Reserve upper-case for custom constants.
if ($var === TRUE)

if ($var === true)
User Contributed Notes: Boolean Function Return Values Add a Comment