(PHP 4 >= 4.0.4, PHP 5)
ctype_lower -- 检查小写字母
bool ctype_lower ( string text )
检查小写字母
<?php
$strings = array('aac123', 'qiutoas', 'QASsdks');
foreach ($strings as $testcase) {
if (ctype_lower($testcase)) {
echo "The string $testcase consists of all lowercase letters.\";
} else {
echo "The string $testcase does not consist of all lowercase letters.\";
}
}
?>
The string aac123 does not consist of all lowercase letters. The string qiutoas consists of all lowercase letters. The string QASsdks does not consist of all lowercase letters.