diff --git a/Exception/SyntaxErrorException.php b/Exception/SyntaxErrorException.php
index 5a9d807..52d8259 100644
--- a/Exception/SyntaxErrorException.php
+++ b/Exception/SyntaxErrorException.php
@@ -25,17 +25,17 @@ class SyntaxErrorException extends ParseException
 {
     public static function unexpectedToken(string $expectedValue, Token $foundToken): self
     {
-        return new self(sprintf('Expected %s, but %s found.', $expectedValue, $foundToken));
+        return new self(\sprintf('Expected %s, but %s found.', $expectedValue, $foundToken));
     }
 
     public static function pseudoElementFound(string $pseudoElement, string $unexpectedLocation): self
     {
-        return new self(sprintf('Unexpected pseudo-element "::%s" found %s.', $pseudoElement, $unexpectedLocation));
+        return new self(\sprintf('Unexpected pseudo-element "::%s" found %s.', $pseudoElement, $unexpectedLocation));
     }
 
     public static function unclosedString(int $position): self
     {
-        return new self(sprintf('Unclosed/invalid string at %s.', $position));
+        return new self(\sprintf('Unclosed/invalid string at %s.', $position));
     }
 
     public static function nestedNot(): self
@@ -45,7 +45,7 @@ public static function nestedNot(): self
 
     public static function notAtTheStartOfASelector(string $pseudoElement): self
     {
-        return new self(sprintf('Got immediate child pseudo-element ":%s" not at the start of a selector', $pseudoElement));
+        return new self(\sprintf('Got immediate child pseudo-element ":%s" not at the start of a selector', $pseudoElement));
     }
 
     public static function stringAsFunctionArgument(): self
diff --git a/Node/AttributeNode.php b/Node/AttributeNode.php
index ba4df31..967cb7c 100644
--- a/Node/AttributeNode.php
+++ b/Node/AttributeNode.php
@@ -73,7 +73,7 @@ public function __toString(): string
         $attribute = $this->namespace ? $this->namespace.'|'.$this->attribute : $this->attribute;
 
         return 'exists' === $this->operator
-            ? sprintf('%s[%s[%s]]', $this->getNodeName(), $this->selector, $attribute)
-            : sprintf("%s[%s[%s %s '%s']]", $this->getNodeName(), $this->selector, $attribute, $this->operator, $this->value);
+            ? \sprintf('%s[%s[%s]]', $this->getNodeName(), $this->selector, $attribute)
+            : \sprintf("%s[%s[%s %s '%s']]", $this->getNodeName(), $this->selector, $attribute, $this->operator, $this->value);
     }
 }
diff --git a/Node/ClassNode.php b/Node/ClassNode.php
index 7174458..7cca6d9 100644
--- a/Node/ClassNode.php
+++ b/Node/ClassNode.php
@@ -49,6 +49,6 @@ public function getSpecificity(): Specificity
 
     public function __toString(): string
     {
-        return sprintf('%s[%s.%s]', $this->getNodeName(), $this->selector, $this->name);
+        return \sprintf('%s[%s.%s]', $this->getNodeName(), $this->selector, $this->name);
     }
 }
diff --git a/Node/CombinedSelectorNode.php b/Node/CombinedSelectorNode.php
index 19fecb7..1db62a2 100644
--- a/Node/CombinedSelectorNode.php
+++ b/Node/CombinedSelectorNode.php
@@ -58,6 +58,6 @@ public function __toString(): string
     {
         $combinator = ' ' === $this->combinator ? '<followed>' : $this->combinator;
 
-        return sprintf('%s[%s %s %s]', $this->getNodeName(), $this->selector, $combinator, $this->subSelector);
+        return \sprintf('%s[%s %s %s]', $this->getNodeName(), $this->selector, $combinator, $this->subSelector);
     }
 }
diff --git a/Node/ElementNode.php b/Node/ElementNode.php
index 76d2078..bd4a7fe 100644
--- a/Node/ElementNode.php
+++ b/Node/ElementNode.php
@@ -51,6 +51,6 @@ public function __toString(): string
     {
         $element = $this->element ?: '*';
 
-        return sprintf('%s[%s]', $this->getNodeName(), $this->namespace ? $this->namespace.'|'.$element : $element);
+        return \sprintf('%s[%s]', $this->getNodeName(), $this->namespace ? $this->namespace.'|'.$element : $element);
     }
 }
diff --git a/Node/FunctionNode.php b/Node/FunctionNode.php
index 938a82b..09342a1 100644
--- a/Node/FunctionNode.php
+++ b/Node/FunctionNode.php
@@ -66,6 +66,6 @@ public function __toString(): string
     {
         $arguments = implode(', ', array_map(fn (Token $token) => "'".$token->getValue()."'", $this->arguments));
 
-        return sprintf('%s[%s:%s(%s)]', $this->getNodeName(), $this->selector, $this->name, $arguments ? '['.$arguments.']' : '');
+        return \sprintf('%s[%s:%s(%s)]', $this->getNodeName(), $this->selector, $this->name, $arguments ? '['.$arguments.']' : '');
     }
 }
diff --git a/Node/HashNode.php b/Node/HashNode.php
index 3af8e84..014ae54 100644
--- a/Node/HashNode.php
+++ b/Node/HashNode.php
@@ -49,6 +49,6 @@ public function getSpecificity(): Specificity
 
     public function __toString(): string
     {
-        return sprintf('%s[%s#%s]', $this->getNodeName(), $this->selector, $this->id);
+        return \sprintf('%s[%s#%s]', $this->getNodeName(), $this->selector, $this->id);
     }
 }
diff --git a/Node/NegationNode.php b/Node/NegationNode.php
index f806758..967b65b 100644
--- a/Node/NegationNode.php
+++ b/Node/NegationNode.php
@@ -49,6 +49,6 @@ public function getSpecificity(): Specificity
 
     public function __toString(): string
     {
-        return sprintf('%s[%s:not(%s)]', $this->getNodeName(), $this->selector, $this->subSelector);
+        return \sprintf('%s[%s:not(%s)]', $this->getNodeName(), $this->selector, $this->subSelector);
     }
 }
diff --git a/Node/PseudoNode.php b/Node/PseudoNode.php
index c21cd6e..cbebd9f 100644
--- a/Node/PseudoNode.php
+++ b/Node/PseudoNode.php
@@ -49,6 +49,6 @@ public function getSpecificity(): Specificity
 
     public function __toString(): string
     {
-        return sprintf('%s[%s:%s]', $this->getNodeName(), $this->selector, $this->identifier);
+        return \sprintf('%s[%s:%s]', $this->getNodeName(), $this->selector, $this->identifier);
     }
 }
diff --git a/Node/SelectorNode.php b/Node/SelectorNode.php
index 2318b2b..6b70535 100644
--- a/Node/SelectorNode.php
+++ b/Node/SelectorNode.php
@@ -49,6 +49,6 @@ public function getSpecificity(): Specificity
 
     public function __toString(): string
     {
-        return sprintf('%s[%s%s]', $this->getNodeName(), $this->tree, $this->pseudoElement ? '::'.$this->pseudoElement : '');
+        return \sprintf('%s[%s%s]', $this->getNodeName(), $this->tree, $this->pseudoElement ? '::'.$this->pseudoElement : '');
     }
 }
diff --git a/Parser/Handler/StringHandler.php b/Parser/Handler/StringHandler.php
index 5fd44df..d5c6d36 100644
--- a/Parser/Handler/StringHandler.php
+++ b/Parser/Handler/StringHandler.php
@@ -52,7 +52,7 @@ public function handle(Reader $reader, TokenStream $stream): bool
         $match = $reader->findPattern($this->patterns->getQuotedStringPattern($quote));
 
         if (!$match) {
-            throw new InternalErrorException(sprintf('Should have found at least an empty match at %d.', $reader->getPosition()));
+            throw new InternalErrorException(\sprintf('Should have found at least an empty match at %d.', $reader->getPosition()));
         }
 
         // check unclosed strings
diff --git a/Parser/Token.php b/Parser/Token.php
index b50441a..5bf8c22 100644
--- a/Parser/Token.php
+++ b/Parser/Token.php
@@ -103,9 +103,9 @@ public function isString(): bool
     public function __toString(): string
     {
         if ($this->value) {
-            return sprintf('<%s "%s" at %s>', $this->type, $this->value, $this->position);
+            return \sprintf('<%s "%s" at %s>', $this->type, $this->value, $this->position);
         }
 
-        return sprintf('<%s at %s>', $this->type, $this->position);
+        return \sprintf('<%s at %s>', $this->type, $this->position);
     }
 }
diff --git a/Parser/Tokenizer/TokenizerPatterns.php b/Parser/Tokenizer/TokenizerPatterns.php
index 3c77cf0..1825bbf 100644
--- a/Parser/Tokenizer/TokenizerPatterns.php
+++ b/Parser/Tokenizer/TokenizerPatterns.php
@@ -84,6 +84,6 @@ public function getNumberPattern(): string
 
     public function getQuotedStringPattern(string $quote): string
     {
-        return '~^'.sprintf($this->quotedStringPattern, $quote).'~i';
+        return '~^'.\sprintf($this->quotedStringPattern, $quote).'~i';
     }
 }
diff --git a/Tests/Parser/ParserTest.php b/Tests/Parser/ParserTest.php
index a8708ce..e34f2dc 100644
--- a/Tests/Parser/ParserTest.php
+++ b/Tests/Parser/ParserTest.php
@@ -70,7 +70,7 @@ public function testSpecificity($source, $value)
     public function testParseSeries($series, $a, $b)
     {
         $parser = new Parser();
-        $selectors = $parser->parse(sprintf(':nth-child(%s)', $series));
+        $selectors = $parser->parse(\sprintf(':nth-child(%s)', $series));
         $this->assertCount(1, $selectors);
 
         /** @var FunctionNode $function */
@@ -82,7 +82,7 @@ public function testParseSeries($series, $a, $b)
     public function testParseSeriesException($series)
     {
         $parser = new Parser();
-        $selectors = $parser->parse(sprintf(':nth-child(%s)', $series));
+        $selectors = $parser->parse(\sprintf(':nth-child(%s)', $series));
         $this->assertCount(1, $selectors);
 
         /** @var FunctionNode $function */
diff --git a/XPath/Extension/AttributeMatchingExtension.php b/XPath/Extension/AttributeMatchingExtension.php
index 3c785e9..28a16c1 100644
--- a/XPath/Extension/AttributeMatchingExtension.php
+++ b/XPath/Extension/AttributeMatchingExtension.php
@@ -47,12 +47,12 @@ public function translateExists(XPathExpr $xpath, string $attribute, ?string $va
 
     public function translateEquals(XPathExpr $xpath, string $attribute, ?string $value): XPathExpr
     {
-        return $xpath->addCondition(sprintf('%s = %s', $attribute, Translator::getXpathLiteral($value)));
+        return $xpath->addCondition(\sprintf('%s = %s', $attribute, Translator::getXpathLiteral($value)));
     }
 
     public function translateIncludes(XPathExpr $xpath, string $attribute, ?string $value): XPathExpr
     {
-        return $xpath->addCondition($value ? sprintf(
+        return $xpath->addCondition($value ? \sprintf(
             '%1$s and contains(concat(\' \', normalize-space(%1$s), \' \'), %2$s)',
             $attribute,
             Translator::getXpathLiteral(' '.$value.' ')
@@ -61,7 +61,7 @@ public function translateIncludes(XPathExpr $xpath, string $attribute, ?string $
 
     public function translateDashMatch(XPathExpr $xpath, string $attribute, ?string $value): XPathExpr
     {
-        return $xpath->addCondition(sprintf(
+        return $xpath->addCondition(\sprintf(
             '%1$s and (%1$s = %2$s or starts-with(%1$s, %3$s))',
             $attribute,
             Translator::getXpathLiteral($value),
@@ -71,7 +71,7 @@ public function translateDashMatch(XPathExpr $xpath, string $attribute, ?string
 
     public function translatePrefixMatch(XPathExpr $xpath, string $attribute, ?string $value): XPathExpr
     {
-        return $xpath->addCondition($value ? sprintf(
+        return $xpath->addCondition($value ? \sprintf(
             '%1$s and starts-with(%1$s, %2$s)',
             $attribute,
             Translator::getXpathLiteral($value)
@@ -80,7 +80,7 @@ public function translatePrefixMatch(XPathExpr $xpath, string $attribute, ?strin
 
     public function translateSuffixMatch(XPathExpr $xpath, string $attribute, ?string $value): XPathExpr
     {
-        return $xpath->addCondition($value ? sprintf(
+        return $xpath->addCondition($value ? \sprintf(
             '%1$s and substring(%1$s, string-length(%1$s)-%2$s) = %3$s',
             $attribute,
             \strlen($value) - 1,
@@ -90,7 +90,7 @@ public function translateSuffixMatch(XPathExpr $xpath, string $attribute, ?strin
 
     public function translateSubstringMatch(XPathExpr $xpath, string $attribute, ?string $value): XPathExpr
     {
-        return $xpath->addCondition($value ? sprintf(
+        return $xpath->addCondition($value ? \sprintf(
             '%1$s and contains(%1$s, %2$s)',
             $attribute,
             Translator::getXpathLiteral($value)
@@ -99,7 +99,7 @@ public function translateSubstringMatch(XPathExpr $xpath, string $attribute, ?st
 
     public function translateDifferent(XPathExpr $xpath, string $attribute, ?string $value): XPathExpr
     {
-        return $xpath->addCondition(sprintf(
+        return $xpath->addCondition(\sprintf(
             $value ? 'not(%1$s) or %1$s != %2$s' : '%s != %s',
             $attribute,
             Translator::getXpathLiteral($value)
diff --git a/XPath/Extension/FunctionExtension.php b/XPath/Extension/FunctionExtension.php
index 4b9d7bc..557e305 100644
--- a/XPath/Extension/FunctionExtension.php
+++ b/XPath/Extension/FunctionExtension.php
@@ -50,7 +50,7 @@ public function translateNthChild(XPathExpr $xpath, FunctionNode $function, bool
         try {
             [$a, $b] = Parser::parseSeries($function->getArguments());
         } catch (SyntaxErrorException $e) {
-            throw new ExpressionErrorException(sprintf('Invalid series: "%s".', implode('", "', $function->getArguments())), 0, $e);
+            throw new ExpressionErrorException(\sprintf('Invalid series: "%s".', implode('", "', $function->getArguments())), 0, $e);
         }
 
         $xpath->addStarPrefix();
@@ -83,10 +83,10 @@ public function translateNthChild(XPathExpr $xpath, FunctionNode $function, bool
             $expr .= ' - '.$b;
         }
 
-        $conditions = [sprintf('%s %s 0', $expr, $sign)];
+        $conditions = [\sprintf('%s %s 0', $expr, $sign)];
 
         if (1 !== $a && -1 !== $a) {
-            $conditions[] = sprintf('(%s) mod %d = 0', $expr, $a);
+            $conditions[] = \sprintf('(%s) mod %d = 0', $expr, $a);
         }
 
         return $xpath->addCondition(implode(' and ', $conditions));
@@ -134,7 +134,7 @@ public function translateContains(XPathExpr $xpath, FunctionNode $function): XPa
             }
         }
 
-        return $xpath->addCondition(sprintf(
+        return $xpath->addCondition(\sprintf(
             'contains(string(.), %s)',
             Translator::getXpathLiteral($arguments[0]->getValue())
         ));
@@ -152,7 +152,7 @@ public function translateLang(XPathExpr $xpath, FunctionNode $function): XPathEx
             }
         }
 
-        return $xpath->addCondition(sprintf(
+        return $xpath->addCondition(\sprintf(
             'lang(%s)',
             Translator::getXpathLiteral($arguments[0]->getValue())
         ));
diff --git a/XPath/Extension/HtmlExtension.php b/XPath/Extension/HtmlExtension.php
index 4653add..b3bf132 100644
--- a/XPath/Extension/HtmlExtension.php
+++ b/XPath/Extension/HtmlExtension.php
@@ -142,7 +142,7 @@ public function translateLang(XPathExpr $xpath, FunctionNode $function): XPathEx
             }
         }
 
-        return $xpath->addCondition(sprintf(
+        return $xpath->addCondition(\sprintf(
             'ancestor-or-self::*[@lang][1][starts-with(concat('
             ."translate(@%s, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'), '-')"
             .', %s)]',
diff --git a/XPath/Extension/NodeExtension.php b/XPath/Extension/NodeExtension.php
index 49e894a..2ccf71a 100644
--- a/XPath/Extension/NodeExtension.php
+++ b/XPath/Extension/NodeExtension.php
@@ -91,7 +91,7 @@ public function translateNegation(Node\NegationNode $node, Translator $translato
         $subXpath->addNameTest();
 
         if ($subXpath->getCondition()) {
-            return $xpath->addCondition(sprintf('not(%s)', $subXpath->getCondition()));
+            return $xpath->addCondition(\sprintf('not(%s)', $subXpath->getCondition()));
         }
 
         return $xpath->addCondition('0');
@@ -121,11 +121,11 @@ public function translateAttribute(Node\AttributeNode $node, Translator $transla
         }
 
         if ($node->getNamespace()) {
-            $name = sprintf('%s:%s', $node->getNamespace(), $name);
+            $name = \sprintf('%s:%s', $node->getNamespace(), $name);
             $safe = $safe && $this->isSafeName($node->getNamespace());
         }
 
-        $attribute = $safe ? '@'.$name : sprintf('attribute::*[name() = %s]', Translator::getXpathLiteral($name));
+        $attribute = $safe ? '@'.$name : \sprintf('attribute::*[name() = %s]', Translator::getXpathLiteral($name));
         $value = $node->getValue();
         $xpath = $translator->nodeToXPath($node->getSelector());
 
@@ -166,7 +166,7 @@ public function translateElement(Node\ElementNode $node): XPathExpr
         }
 
         if ($node->getNamespace()) {
-            $element = sprintf('%s:%s', $node->getNamespace(), $element);
+            $element = \sprintf('%s:%s', $node->getNamespace(), $element);
             $safe = $safe && $this->isSafeName($node->getNamespace());
         }
 
diff --git a/XPath/Extension/PseudoClassExtension.php b/XPath/Extension/PseudoClassExtension.php
index aada832..397f06f 100644
--- a/XPath/Extension/PseudoClassExtension.php
+++ b/XPath/Extension/PseudoClassExtension.php
@@ -107,7 +107,7 @@ public function translateOnlyOfType(XPathExpr $xpath): XPathExpr
     {
         $element = $xpath->getElement();
 
-        return $xpath->addCondition(sprintf('count(preceding-sibling::%s)=0 and count(following-sibling::%s)=0', $element, $element));
+        return $xpath->addCondition(\sprintf('count(preceding-sibling::%s)=0 and count(following-sibling::%s)=0', $element, $element));
     }
 
     public function translateEmpty(XPathExpr $xpath): XPathExpr
diff --git a/XPath/Translator.php b/XPath/Translator.php
index 9e66ce7..b2623e5 100644
--- a/XPath/Translator.php
+++ b/XPath/Translator.php
@@ -75,7 +75,7 @@ public static function getXpathLiteral(string $element): string
         $parts = [];
         while (true) {
             if (false !== $pos = strpos($string, "'")) {
-                $parts[] = sprintf("'%s'", substr($string, 0, $pos));
+                $parts[] = \sprintf("'%s'", substr($string, 0, $pos));
                 $parts[] = "\"'\"";
                 $string = substr($string, $pos + 1);
             } else {
@@ -84,7 +84,7 @@ public static function getXpathLiteral(string $element): string
             }
         }
 
-        return sprintf('concat(%s)', implode(', ', $parts));
+        return \sprintf('concat(%s)', implode(', ', $parts));
     }
 
     public function cssToXPath(string $cssExpr, string $prefix = 'descendant-or-self::'): string
@@ -130,7 +130,7 @@ public function registerExtension(Extension\ExtensionInterface $extension): stat
     public function getExtension(string $name): Extension\ExtensionInterface
     {
         if (!isset($this->extensions[$name])) {
-            throw new ExpressionErrorException(sprintf('Extension "%s" not registered.', $name));
+            throw new ExpressionErrorException(\sprintf('Extension "%s" not registered.', $name));
         }
 
         return $this->extensions[$name];
@@ -152,7 +152,7 @@ public function registerParserShortcut(ParserInterface $shortcut): static
     public function nodeToXPath(NodeInterface $node): XPathExpr
     {
         if (!isset($this->nodeTranslators[$node->getNodeName()])) {
-            throw new ExpressionErrorException(sprintf('Node "%s" not supported.', $node->getNodeName()));
+            throw new ExpressionErrorException(\sprintf('Node "%s" not supported.', $node->getNodeName()));
         }
 
         return $this->nodeTranslators[$node->getNodeName()]($node, $this);
@@ -164,7 +164,7 @@ public function nodeToXPath(NodeInterface $node): XPathExpr
     public function addCombination(string $combiner, NodeInterface $xpath, NodeInterface $combinedXpath): XPathExpr
     {
         if (!isset($this->combinationTranslators[$combiner])) {
-            throw new ExpressionErrorException(sprintf('Combiner "%s" not supported.', $combiner));
+            throw new ExpressionErrorException(\sprintf('Combiner "%s" not supported.', $combiner));
         }
 
         return $this->combinationTranslators[$combiner]($this->nodeToXPath($xpath), $this->nodeToXPath($combinedXpath));
@@ -176,7 +176,7 @@ public function addCombination(string $combiner, NodeInterface $xpath, NodeInter
     public function addFunction(XPathExpr $xpath, FunctionNode $function): XPathExpr
     {
         if (!isset($this->functionTranslators[$function->getName()])) {
-            throw new ExpressionErrorException(sprintf('Function "%s" not supported.', $function->getName()));
+            throw new ExpressionErrorException(\sprintf('Function "%s" not supported.', $function->getName()));
         }
 
         return $this->functionTranslators[$function->getName()]($xpath, $function);
@@ -188,7 +188,7 @@ public function addFunction(XPathExpr $xpath, FunctionNode $function): XPathExpr
     public function addPseudoClass(XPathExpr $xpath, string $pseudoClass): XPathExpr
     {
         if (!isset($this->pseudoClassTranslators[$pseudoClass])) {
-            throw new ExpressionErrorException(sprintf('Pseudo-class "%s" not supported.', $pseudoClass));
+            throw new ExpressionErrorException(\sprintf('Pseudo-class "%s" not supported.', $pseudoClass));
         }
 
         return $this->pseudoClassTranslators[$pseudoClass]($xpath);
@@ -200,7 +200,7 @@ public function addPseudoClass(XPathExpr $xpath, string $pseudoClass): XPathExpr
     public function addAttributeMatching(XPathExpr $xpath, string $operator, string $attribute, ?string $value): XPathExpr
     {
         if (!isset($this->attributeMatchingTranslators[$operator])) {
-            throw new ExpressionErrorException(sprintf('Attribute matcher operator "%s" not supported.', $operator));
+            throw new ExpressionErrorException(\sprintf('Attribute matcher operator "%s" not supported.', $operator));
         }
 
         return $this->attributeMatchingTranslators[$operator]($xpath, $attribute, $value);
diff --git a/XPath/XPathExpr.php b/XPath/XPathExpr.php
index a76e30b..4b1ffaa 100644
--- a/XPath/XPathExpr.php
+++ b/XPath/XPathExpr.php
@@ -48,7 +48,7 @@ public function getElement(): string
      */
     public function addCondition(string $condition): static
     {
-        $this->condition = $this->condition ? sprintf('(%s) and (%s)', $this->condition, $condition) : $condition;
+        $this->condition = $this->condition ? \sprintf('(%s) and (%s)', $this->condition, $condition) : $condition;
 
         return $this;
     }