Fandom

PHP Wiki

Strtoupper

51pages on
this wiki
Add New Page
Talk0 Share

Returns a given string with all alphabetic characters converted to uppercase.

Arguments Edit

void strtoupper ({{{params}}})

Argument Inclusion Edit

  • strtoupper needs PHP version 4 or 5 to work.

Return values Edit

strtoupper will return the given string with all alphabetic characters converted to uppercase. According to the php manual 'alphabetic' is determined by the current locale. So umlaut-a (ä) or other special characters from different languages might not get converted.

Examples Edit

Example 1: The direct way Edit

<?php
 echo strtoupper("I am Small");
?>

Output Edit

I AM SMALL

Example 2: Using a variable Edit

<?php
 $string = "special chars (#*+...) AND UPPERCASE STAY untouched!";
 echo strtoupper($string);
?>

Output Edit

SPECIAL CHARS (#*+...) AND UPPERCASE STAY UNTOUCHED!
For more details on this function, visit its entry in the php manual.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.