(PHP 4 >= 4.0.4, PHP 5, PHP 7)
ctype_punct — ���ɴ�ӡ���ַ��Dz��Dz������հס����ֺ���ĸ
text
��Ҫ�����Ե��ַ�����
����� text
�����ÿ���ַ������ܴ�ӡ�ģ���������ĸ�����֣�Ҳ���ǿհף���ô�ͷ��� TRUE
����֮�� FALSE
��
Example #1 һ�� ctype_punct() ������
<?php
$strings = array('ABasdk!@!$#', '!@ # $', '*&$()');
foreach ($strings as $testcase) {
if (ctype_punct($testcase)) {
echo "The string $testcase consists of all punctuation.\n";
} else {
echo "The string $testcase does not consist of all punctuation.\n";
}
}
?>
�������̻������
The string ABasdk!@!$# does not consist of all punctuation. The string !@ # $ does not consist of all punctuation. The string *&$() consists of all punctuation.
Note:
�������һ�� -128 �� 255 ֮��(��)������, ���ᱻ����Ϊ��ֵ��Ӧ��ASCII�ַ� (��ֵ������ 256 ��֧����չASCII�ַ�). �����������ᱻ����Ϊ��ֵ��Ӧ��ʮ�����ַ���.