Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

php
string
uppercase
communitycreator

What is strtoupper() in PHP?

Harris Amjad

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

The strtoupper() function in PHP converts a string to uppercase.

The following figure shows a visual representation of the strtoupper() function.

Visual representation of the strtoupper() function

Syntax

string strtoupper(string)

Parameter

As a parameter, the strtoupper() function requires a string that is to be converted to uppercase.

Return value

The strtoupper() function returns a string that is converted to uppercase.

Code

The code below shows how the strtoupper() function works.

<?php
#string
echo("strtoupper('educative'): ");
echo (strtoupper('educative'));
echo("\n");
#string with number
echo("strtoupper('educative09'): ");
echo (strtoupper('educative09'));
?>

RELATED TAGS

php
string
uppercase
communitycreator

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Keep Exploring