PHP strtoupper() 函数

PHP 教程 · 2019-01-30 12:58:21

实例

把所有字符转换为大写:

<?php
echo strtoupper("Hello WORLD!");
?>

定义和用法

strtoupper() 函数把字符串转换为大写。

注释:该函数是二进制安全的。

相关函数:

  • strtolower() - 把字符串转换为小写
  • lcfirst() - 把字符串中的首字符转换为小写
  • ucfirst() - 把字符串中的首字符转换为大写
  • ucwords() - 把字符串中每个单词的首字符转换为大写

语法


strtoupper(string)


参数 描述
string 必需。规定要转换的字符串。

技术细节

返回值: 返回转换为大写的字符串。
PHP 版本: 4+

点击查看所有 PHP 教程 文章: https://codercto.com/courses/l/5.html

查看所有标签

The Little Prover

The Little Prover

Daniel P. Friedman、Carl Eastlund / The MIT Press / 2015-7-10 / USD 38.00

[FROM www.amazon.com]: The Little Prover introduces inductive proofs as a way to determine facts about computer programs. It is written in an approachable, engaging style of question-and-answer, wi......一起来看看 《The Little Prover》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

在线进制转换器
在线进制转换器

各进制数互转换器