I have some code that pulls database primary keys and iterates through them by calling a function.
When I get the key from the database and do a is_int($key) it returns true.
I then call a function: thisfunction($key)
In the calling function, I made it so that you could pass in the $key and that function loads the row for that key or you can pass the row as an object. At the beginning of the called function, it checks to see if $key is_int. It is returning false when I am calling it with an integer value.