Well I do have a solution using preg_match:
(or something like that - I'm not at my normal PC)
And this works fine for what I want (although other solutions may be slightly faster). Ie to allow only whole, simple, positive numbers, whether it be an integer literal or a string literal. No decimals. no signs. No other string characters. Basically what you'd expect out of a database auto increment primary key.
I was just wondering if I had been missing some native PHP function to do this, but I guess there isn't one because I'm actually wanting to exclude some valid integer elements like signs.