IntlChar::islower() function in PHP

The IntlChar::islower() function checks whether the given input character is a lowercase character or not.

Syntax

bool IntlChar::islower(val)

Parameters

  • val − A character encoded as a UTF-8 string or an integer codepoint value.

Return Value

The IntlChar::islower() function returns TRUE if the entered value is a lowercase character, FALSE otherwise.

Example

The following example demonstrates how to check if characters are lowercase −

<?php
    var_dump(IntlChar::islower("a"));
    echo "<br>";
    var_dump(IntlChar::islower("A"));
    echo "<br>";
    var_dump(IntlChar::islower("z"));
    echo "<br>";
    var_dump(IntlChar::islower("1"));
    echo "<br>";
    var_dump(IntlChar::islower("@"));
?>

The output of the above code is −

bool(true)
bool(false)
bool(true)
bool(false)
bool(false)

Using Unicode Codepoints

You can also pass Unicode codepoint values as integers −

<?php
    // Codepoint for 'a' is 97
    var_dump(IntlChar::islower(97));
    echo "<br>";
    // Codepoint for 'A' is 65
    var_dump(IntlChar::islower(65));
?>

The output of the above code is −

bool(true)
bool(false)

Conclusion

The IntlChar::islower() function is useful for validating lowercase characters in internationalization contexts. It accepts both string characters and Unicode codepoint integers as input.

Updated on: 2026-03-15T07:46:28+05:30

131 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements