Oihana PHP

lower.php

Table of Contents

Functions

lower()  : string
Converts a string to lowercase using multibyte-safe methods when possible.

Functions

lower()

Converts a string to lowercase using multibyte-safe methods when possible.

lower(string|null $source) : string

This function ensures proper transformation of characters beyond ASCII, such as accented letters (e.g., 'É' → 'é') or other UTF-8 characters.

If the string is empty or null, an empty string is returned.

Parameters
$source : string|null

The string to convert to lowercase.

Tags
example
echo lower("HELLO WORLD");
// Output: "hello world"

echo lower("École Française");
// Output: "école française"

echo lower(null);
// Output: ""

echo lower("123-ABC");
// Output: "123-abc"
author

Marc Alcaraz (ekameleon)

since
1.0.0
Return values
string

The lowercase version of the string.


        
On this page

Search results