PHP - 字符串随机排序函数



语法

string str_shuffle ( string $str )

定义和用法

用于随机打乱字符串。

返回值

返回打乱后的字符串。

参数

序号 参数及说明
1

字符串

包含输入字符串的信息。

示例

尝试以下示例

<?php
   $input = 'abcdefphp_function_str_shuffle';
   $shuffled = str_shuffle($input);
   
   echo $shuffled;
?>
felsdirnf_ecu_fhpnt_uafosbpcht
php_function_reference.htm
广告
© . All rights reserved.