I am trying to detect if the input is a users id or a username. I've tried doing this
if (is_int($user)) {
    echo "is int";
}else{
    echo "is not";
}
However it isn't working, it doesn't detect it as an int if it is. I've thought about doing (int) $user but if they have a username like "example2" it will become 2 and then become the id 2 right?
 
     
     
     
     
    