Ctype::ctype_digit( string|int $text )

Returns TRUE if every character in the string text is a decimal digit, FALSE otherwise.


Description

See also


Parameters

$text

(string|int) (Required)


Return

(bool)


Source

File: vendor/symfony/polyfill-ctype/Ctype.php

    public static function ctype_digit($text)
    {
        $text = self::convert_int_to_char_for_ctype($text);

        return \is_string($text) && '' !== $text && !preg_match('/[^0-9]/', $text);
    }