If the string does not contain any of the characters '.', 'e', or 'E' and the numeric value fits into integer type limits (as defined by PHP_INT_MAX), the string will be evaluated as an integer.
Alternatively there is the intval function:
<?php
$string = "32";
$newstring = intval($string);
echo $newstring; // output: 32 (integer value of string var)
?>