diff --git a/src/Symfony/Component/ExpressionLanguage/Lexer.php b/src/Symfony/Component/ExpressionLanguage/Lexer.php
index <HASH>..<HASH> 100644
--- a/src/Symfony/Component/ExpressionLanguage/Lexer.php
+++ b/src/Symfony/Component/ExpressionLanguage/Lexer.php
@@ -45,7 +45,7 @@ class Lexer
             if (preg_match('/[0-9]+(?:\.[0-9]+)?/A', $expression, $match, null, $cursor)) {
                 // numbers
                 $number = (float) $match[0];  // floats
-                if (ctype_digit($match[0]) && $number <= PHP_INT_MAX) {
+                if (preg_match('/^[0-9]+$/', $match[0]) && $number <= PHP_INT_MAX) {
                     $number = (int) $match[0]; // integers lower than the maximum
                 }
                 $tokens[] = new Token(Token::NUMBER_TYPE, $number, $cursor + 1);
[ExpressionLanguage] Avoid dependency on ctype

This avoids ExpressionLanguage library dependency on ctype.