strtolower 将字符串转化为小写

发表日期:2021-07-01 10:23:25 | 来源: | | 浏览(944) 分类:字符串 函数

strtolower

(PHP 4, PHP 5, PHP 7, PHP 8)

strtolower将字符串转化为小写

说明

strtolower(string $string): string

string 中所有的字母字符转换为小写并返回。

注意 “字母” 与当前所在区域有关。例如,在默认的 “C” 区域,字符 umlaut-A(ä)就不会被转换。

参数

string

输入字符串。

返回值

返回转换后的小写字符串。

范例

示例 #1 strtolower() 范例

<?php 
$str = "Mary Had A Little Lamb and She LOVED It So";
$str = strtolower($str);
echo $str;
 // 打印 mary had a little lamb and she loved it so?>

注释

注意: 此函数可安全用于二进制对象。

参见

集速网 copyRight © 2015-2022 宁ICP备15000399号-1 宁公网安备 64010402001209号
与其临渊羡鱼,不如退而结网
欢迎转载、分享、引用、推荐、收藏。