PHP is a weakly typed language, and generally speaking you do not need to worry about what type a variable is, as PHP will automatically convert it as needed for different types of operations. For instance:
$a = "1"; // $a is set to the string "1"
$b = $a + 2; // $b will now be 3
If for some reason you need/want to reference a variable as a specific type, you can typecast it:
$b = (integer) $a + 2;
$c = "This is test number " . (string) $a;
You can also use the [man]settype/man function.
But to reiterate, the vast majority of the time you can probably let PHP do its own automatic typecasting and not worry about it.