diff --git a/classes/tests/critical.php b/classes/tests/critical.php
index <HASH>..<HASH> 100644
--- a/classes/tests/critical.php
+++ b/classes/tests/critical.php
@@ -144,10 +144,8 @@ class critical {
 		}
 
 		// find the start of PHP class declaration
-		if (strpos($line, 'class') === 0) {
-			if (preg_match('#class (\w+)#', $line, $matches)) {
-				$lastClassName = $matches[1];
-			}
+		if (preg_match('#^(abstract\s+)?class (\w+)#', $line, $matches)) {
+			$lastClassName = $matches[2];
 		}
 
 		// is the class name used as the function name?
diff --git a/testcases.php b/testcases.php
index <HASH>..<HASH> 100644
--- a/testcases.php
+++ b/testcases.php
@@ -153,3 +153,8 @@ class FooBar
 		// NOP
 	}
 }
+
+abstract class TheThing {
+	public function TheThing() {
+	}
+}
oldClassConstructors: handle abstract classes