strtoupper
(PHP 4, PHP 5)
strtoupper — Make a string uppercase
说明
string strtoupper
( string $string
)
Returns string with all alphabetic characters converted to uppercase.
Note that 'alphabetic' is determined by the current locale. For instance, in the default "C" locale characters such as umlaut-a (ä) will not be converted.
参数
- string
-
The input string.
返回值
Returns the uppercased string.
范例
Example#1 strtoupper() example
<?php
$str = "Mary Had A Little Lamb and She LOVED It So";
$str = strtoupper($str);
echo $str; // Prints MARY HAD A LITTLE LAMB AND SHE LOVED IT SO
?>
注释
Note: 本函数可安全用于二进制对象。