PHP.nl

ctype_lower

ctype_lower

Check for lowercase character(s)

bool **ctype_lower** mixed $text

Checks if all of the characters in the provided , , are lowercase letters. string``text

textThe tested string. note.ctype.parameter.integer note.ctype.parameter.non-string

Returns true if every character in is a lowercase letter in the current locale. ctype.result.empty-string text

Voorbeeld: A example (using the default locale)

<?php
$strings = array('aac123', 'qiutoas', 'QASsdks');
foreach ($strings as $testcase) {
    if (ctype_lower($testcase)) {
        echo "The string $testcase consists of all lowercase letters.\n";
    } else {
        echo "The string $testcase does not consist of all lowercase letters.\n";
    }
}
?>
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.

ctype_alpha``ctype_upper``setlocale``IntlChar::islower