← All docs

ctype_digit()

Checks if all characters in the string are digits.

ctype_digit()

function ctype_digit(string $text): bool

Checks if all characters in the string are digits.

Parameters:

  • $text (string)

Returns: bool

Availability

No examples yet — check examples/ and showcases/ for usage patterns.

Internals

For how ctype_digit is implemented in the compiler, see the internals page.