PHP 函数 ctype_xdigit()
PHP 函数 ctype_xdigit()
<?php
$strings = array('ABCDEF', 'SAI!@#$', 'ab12bc99');
foreach ($strings as $test) {
if (ctype_xdigit($test)) {
echo "$test consists of all hexadecimal digits. \n";
}else {
echo "$test does not have all hexadecimal digits. \n";
}
}
?>