diff --git a/src/ExcludeList.php b/src/ExcludeList.php
index a8ceb68..3754e81 100644
--- a/src/ExcludeList.php
+++ b/src/ExcludeList.php
@@ -10,7 +10,7 @@
 namespace SebastianBergmann\GlobalState;
 
 use function in_array;
-use function strpos;
+use function str_starts_with;
 use ReflectionClass;
 
 final class ExcludeList
@@ -71,7 +71,7 @@ public function isStaticPropertyExcluded(string $className, string $propertyName
         }
 
         foreach ($this->classNamePrefixes as $prefix) {
-            if (strpos($className, $prefix) === 0) {
+            if (str_starts_with($className, $prefix)) {
                 return true;
             }
         }