$_POST
values are strings, no matter whether they contain a numeric value or not. Just transferring them to a different variable doesn't change that.
You'd have to typecast the variable:
$bob = (int) $_POST['foo'];
but note that non-integer values are cast to 0
in this case.