__str__是什么函数_PHP str_shuffle()函数与示例
__str__是什么函數(shù)
PHP str_shuffle()函數(shù) (PHP str_shuffle() Function)
str_shuffle() function is a string function and it is used to shuffle all characters randomly in the string.
str_shuffle()函數(shù)是一個字符串函數(shù),用于隨機地隨機排列字符串中的所有字符。
When this function executes, all time it returns shuffles string with random characters (characters from the given string).
執(zhí)行此函數(shù)時,所有時間都會返回帶有隨機字符(給定字符串中的字符)的混洗字符串。
Syntax:
句法:
str_shuffle(string);It accepts the string and returns shuffled string.
它接受字符串并返回改組后的字符串。
Examples:
例子:
Input: $str = "This is IncludeHelp"Output:str_shuffle($str) = "enHeIdcupll"str_shuffle($str) = "IcduneeplHl"PHP code:
PHP代碼:
<?php$str = "IncludeHelp"; //printing shuffled string some of the timesecho (str_shuffle($str) . "\n");echo (str_shuffle($str) . "\n");echo (str_shuffle($str) . "\n");echo (str_shuffle($str) . "\n");echo (str_shuffle($str) . "\n");$str = "ABC 123 @!#~&*()"; //printing shuffled string some of the timesecho (str_shuffle($str) . "\n");echo (str_shuffle($str) . "\n");echo (str_shuffle($str) . "\n");echo (str_shuffle($str) . "\n");echo (str_shuffle($str) . "\n"); ?>Output
輸出量
enHeIdcupll IcduneeplHl eenulHpcIld enucIHepdll ldIlceeupHn 2~B*()@# !3A1& C@C&(#)12*~!3BA @* &2CA( !~31#)BB!2C1~([email?protected] A*) &A ~3 (CB2!)@1*#翻譯自: https://www.includehelp.com/php/str_shuffle-function-with-example.aspx
__str__是什么函數(shù)
總結
以上是生活随笔為你收集整理的__str__是什么函数_PHP str_shuffle()函数与示例的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Java Vector setEleme
- 下一篇: chunk_split_PHP chun