Wrong typecast for boolean value

return (boolean)"false" always returns true. 
filter_var($value, FILTER_VALIDATE_BOOLEAN) returns right cast