CcConvertCase

PHP String Case Conversion โ€“ Complete Function Guide

Published 2026-01-26 ยท convertcase.in

PHP has a rich set of built-in functions for string case manipulation. Here is a complete reference with examples.

Try it now โ€” free instant conversion

No signup ยท No limits ยท Works on all devices

Open ConvertCase โ†’

1PHP Case Functions

strtolower("HELLO") โ†’ "hello"
strtoupper("hello") โ†’ "HELLO"
ucwords("hello world") โ†’ "Hello World"
ucfirst("hello world") โ†’ "Hello world"
lcfirst("HELLO") โ†’ "hELLO"

2Multibyte (mb_) Functions

For non-ASCII/UTF-8 strings, use mb_strtolower() and mb_strtoupper() to handle characters correctly.

Frequently Asked Questions

Does PHP have a sentence case function?

ucfirst() is the closest โ€” capitalises the first character. For proper sentence case across multiple sentences, you need custom logic.

Related Guides

Convert Case in Python โ€“ Methods & ExamplesConvert Case in JavaScript โ€“ Methods & ExamplesFree Sentence Case Converter Online