PHP 函数 ctype_punct()
PHP 函数 ctype_punct()
<?php
$strings = array('k211!@!$#', 'foo!#$bar', '*$()');
foreach ($strings as $test) {
if (ctype_punct($test)) {
echo "$test consists of all punctuation. \n";
}else {
echo "$test does not have all punctuation. \n";
}
}
?>