Checking if sqrt() result is an integer
Posted: Wed Mar 11, 2009 6:41 pm
In a script I am working on, I need to check if the output of sqrt() is an integer. I thought this would work with is_int(), but it is always returning false. var_dump() reveals the problem: sqrt() is always returning a float number, even if it's actually an integer. This causes is_int() to return false. How can I check if these float variables are integers?