Any GET/POST variable will come in as strings. It's an HTTP limitation. All it gets is the variable name and a value, so of course, it's not going to assume that all variables including your name are integers 😉 Your typical HTTP/1.0 method will give you something like this for a GET:
GET /page.php?a=123&b=hello&c=a1b2c3d4
from that alone, the web servers must make sense of what values it must assign the variables. As if that's not bothersome enough, autotype detection would simply be a waste of time. That's mainly why PHP is not strong-typed like... C or Pascal.
Of course, there are millions of ways of detecting an integer/float from a string. You can use regexp's, str_tr all numbers, etc., etc. I'll leave you to find the best way for what you're seeking. Hope this gives you an idea 😉