But the forced cast to integer is always guaranteed to result in an integer. So why would it make more sense to explicitly force cast a variable's type to an integer and get a boolean as the functions return value?
Edit:
> (int)$val === false
Would always be false because comparing two types, an integer and boolean would always be false.
Right now I guess that the alternative is using is_numeric and then casting to int if possible.