strtolower

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

strtolower將字符串轉(zhuǎn)化為小寫

說明

strtolower(string $string): string

string 中所有的字母字符轉(zhuǎn)換為小寫并返回。

注意 “字母” 與當前所在區(qū)域有關(guān)。例如,在默認的 “C” 區(qū)域,字符 umlaut-A(?)就不會被轉(zhuǎn)換。

參數(shù)

string

輸入字符串。

返回值

返回轉(zhuǎn)換后的小寫字符串。

范例

示例 #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
?>

注釋

注意: 此函數(shù)可安全用于二進制對象。

參見