convert php return type to integer code example Example: php typecast to int $num = "3.14"; $int = (int)$num; $float = (float)$num;