Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / PHP

strtolower()

Lowercase ASCII letters throughout the string, keeping all other bytes.

Version: PHP 8.4; repository runtime, production runtime not attested

Syntax

strtolower(string $string): string

Lowercase ASCII letters throughout the string, keeping all other bytes. Since PHP 8.2 this does not depend on the locale. Accented uppercase UTF-8 letters remain uppercase; use appropriate multibyte case conversion for Unicode text.

Signature

strtolower(string $string): string

Example output

["abc-12","École"]

Examples

<?php
echo json_encode([strtolower("ABC-12"),strtolower("\u{00C9}COLE")],JSON_UNESCAPED_UNICODE);

Result

["abc-12","École"]

Sources