array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'de', ), 'this' => array ( 0 => 'intlchar.isdigit.php', 1 => 'IntlChar::isdigit', ), 'up' => array ( 0 => 'class.intlchar.php', 1 => 'IntlChar', ), 'prev' => array ( 0 => 'intlchar.isdefined.php', 1 => 'IntlChar::isdefined', ), 'next' => array ( 0 => 'intlchar.isgraph.php', 1 => 'IntlChar::isgraph', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/intl/intlchar/isdigit.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 7, PHP 8)
IntlChar::isdigit — Check if code point is a digit character
Determines whether the specified code point is a digit character.
true
for characters with general category "Nd" (decimal digit numbers). Beginning with Unicode 4, this is the same as testing for the Numeric_Type of Decimal.
Returns true
if
codepoint
is a digit character, false
if not. Returns null
on failure.
Beispiel #1 Testen unterschiedlicher Codepoints
<?php
var_dump(IntlChar::isdigit("A"));
var_dump(IntlChar::isdigit("1"));
var_dump(IntlChar::isdigit("\t"));
?>
Das oben gezeigte Beispiel erzeugt folgende Ausgabe:
bool(false) bool(true) bool(false)