男女疯狂一边摸一边做羞羞视频|啊好深好硬快点用力别停动态图|亚洲一区无码中文字幕|特级无码毛片免费视频播放▽|久久狠狠躁免费观看|国内精品久久久久久网站

ctype_xdigit

(PHP 4 >= 4.0.4, PHP 5, PHP 7, PHP 8)

ctype_xdigit 檢測字符串是否只包含十六進(jìn)制字符

說(shuō)明

ctype_xdigit(string $text): bool

檢查 stringtext 里面的字符是不是都是十六進(jìn)制字符串。

參數

text

需要被測試的字符串。

返回值

如果 text 里面的每個(gè)字符都是十六進(jìn)制字符,也就是只能包含十進(jìn)制的數值和 [A-Fa-f] 的字母,則返回 true 。否則返回 false 。

范例

示例 #1 一個(gè) ctype_xdigit() 的例子

<?php
$strings 
= array('AB10BC99''AR1012''ab12bc99');
foreach (
$strings as $testcase) {
    if (
ctype_xdigit($testcase)) {
        echo 
"The string $testcase consists of all hexadecimal digits.\n";
    } else {
        echo 
"The string $testcase does not consist of all hexadecimal digits.\n";
    }
}
?>

以上例程會(huì )輸出:

The string AB10BC99 consists of all hexadecimal digits.
The string AR1012 does not consist of all hexadecimal digits.
The string ab12bc99 consists of all hexadecimal digits.

注釋

注意:

如果給出一個(gè) -128 到 255 之間(含)的int, 將會(huì )被解釋為該值對應的ASCII字符 (負值將加上 256 以支持擴展ASCII字符). 其它整數將會(huì )被解釋為該值對應的十進(jìn)制字符串.

參見(jiàn)

男女疯狂一边摸一边做羞羞视频|啊好深好硬快点用力别停动态图|亚洲一区无码中文字幕|特级无码毛片免费视频播放▽|久久狠狠躁免费观看|国内精品久久久久久网站