English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

PHP Basic Tutorial

PHP Advanced Tutorial

PHP & MySQL

PHP Reference Manual

PHP strtoupper() Function Usage and Example

    PHP String Character String Function Manual

    The strtoupper() function is used to convert strings to uppercase.

Syntax

string strtoupper ( string $string )

Definition and Usage

 Converts all letter characters in string to uppercase and returns.

Related Functions:

  • strtolower() - Converts the string to lowercase

  • lcfirst() - Converts the first character of the string to lowercase

  • ucfirst() - Converts the first character of the string to uppercase

  • ucwords() - Converts the first character of each word in the string to uppercase

Return Value

Returns the uppercase string.

Parameter

Serial NumberParameter and Description
1

string

Input String

Online Example

Try the following example to convert all strings to uppercase:

<?php
    //strtoupper() Function, Converts All Strings to Uppercase:
   echo strtoupper("www.oldtoolbag.com");
?>
Test and See‹/›

Output Result

www.oldtoolbag.com

PHP String Character String Function Manual