strrev

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

strrev反轉(zhuǎn)字符串

說明

strrev(string $string): string

返回 string 反轉(zhuǎn)后的字符串。

參數(shù)

string

待反轉(zhuǎn)的原始字符串。

返回值

返回反轉(zhuǎn)后的字符串。

范例

示例 #1 使用 strrev() 反轉(zhuǎn)字符串

<?php
echo strrev("Hello world!"); // 輸出 "!dlrow olleH"
?>