PHP strtolower() Function

Example

Convert all characters to lowercase:

<?php
echo strtolower("Hello WORLD.");
?>

Run Example

Definition and Usage

The strtolower() function converts the string to lowercase.

Note:This function is binary safe.

Related Functions:

  • lcfirst() - Convert the first character of the string to lowercase
  • strtoupper() - Convert the string to uppercase
  • ucfirst() - Convert the first character of the string to uppercase
  • ucwords() - Convert the first character of each word in the string to uppercase

Syntax

strtolower(string)
Parameter Description
string Required. Specifies the string to be converted.

Technical Details

Return Value: Return the string converted to lowercase.
PHP Version: 4+