--- a/tagmanager/ctags/php.c
+++ b/tagmanager/ctags/php.c
@@ -672,9 +672,15 @@
 	return result;
 }
 
+static boolean isSpace (int c)
+{
+	return (c == '\t' || c == ' ' || c == '\v' ||
+			c == '\n' || c == '\r' || c == '\f');
+}
+
 static int skipWhitespaces (int c)
 {
-	while (c == '\t' || c == ' ' || c == '\n' || c == '\r')
+	while (isSpace (c))
 		c = fileGetc ();
 	return c;
 }
@@ -695,10 +701,7 @@
 		tolower ((c = fileGetc ()))         != 'i' ||
 		tolower ((c = fileGetc ()))         != 'p' ||
 		tolower ((c = fileGetc ()))         != 't' ||
-		((c = fileGetc ()) != '\t' &&
-		  c                != ' '  &&
-		  c                != '\n' &&
-		  c                != '\r')                ||
+		! isSpace ((c = fileGetc ()))              ||
 		tolower ((c = skipWhitespaces (c))) != 'l' ||
 		tolower ((c = fileGetc ()))         != 'a' ||
 		tolower ((c = fileGetc ()))         != 'n' ||
@@ -806,10 +809,7 @@
 	else
 		c = fileGetc ();
 
-	while (c == '\t' || c == ' ' || c == '\n' || c == '\r')
-	{
-		c = fileGetc ();
-	}
+	c = skipWhitespaces (c);
 
 	token->lineNumber   = getSourceLineNumber ();
 	token->filePosition = getInputFilePosition ();