$int = 5; $int_as_string = (string) $int; echo $int . ' is a '. gettype($int) . " "; echo $int_as_string . ' is a ' . gettype($int_as_string) . " ";