Home > PHP > Function > Ctype > ctype_xdigit()

ctype_xdigit()

ctype_xdigit - Check for character(s) representing a hexadecimal digit

Syntax

bool ctype_xdigit (string $text)

Arguments

  • text - The tested string.

Description

Checks if all of the characters in the provided string, text, are hexadecimal 'digits'.

Version

PHP 4.0.4, 5

Return value

Returns TRUE if every character in text is a hexadecimal 'digit', that is a decimal digit or a character from [A-Fa-f], FALSE otherwise.