Example 1 — Convert Text to Lowercase
Pass any string and get a lowercase copy.
<?php
$text = "Hello WORLD";
$lower = strtolower($text);
echo $lower, PHP_EOL;
echo $text, PHP_EOL; How It Works
- Create a string. It has a mix of upper and lower case letters.
- Call strtolower(). It returns a lowercase copy.
- Print the copy. You see
hello world. - Original is safe.
$textstill has its original case.

