30 seconds of PHP

  Back to Home

isLowerCase

stringbeginner

Returns true if the given string is lower case, false otherwise.

Convert the given string to lower case, using strtolower and compare it to the original.

function isLowerCase($string)
{
  return $string === strtolower($string);
}