2010-03-28 22:10:10 +00:00
<?xml version="1.0" encoding="utf-8"?>
2009-07-11 09:08:43 +00:00
<!-- $Revision$ -->
2017-02-20 22:01:10 +00:00
<refentry xmlns= "http://docbook.org/ns/docbook" xmlns:xlink= "http://www.w3.org/1999/xlink" xml:id= "function.str-shuffle" >
2007-06-11 22:13:26 +00:00
<refnamediv >
<refname > str_shuffle</refname>
<refpurpose > Randomly shuffles a string</refpurpose>
</refnamediv>
2007-06-11 22:14:07 +00:00
<refsect1 role= "description" >
&reftitle.description;
2007-06-11 22:13:26 +00:00
<methodsynopsis >
<type > string</type> <methodname > str_shuffle</methodname>
<methodparam > <type > string</type> <parameter > str</parameter> </methodparam>
</methodsynopsis>
<simpara >
<function > str_shuffle</function> shuffles a string. One permutation
of all possible is created.
</simpara>
2016-07-10 12:25:24 +00:00
&caution.cryptographically-insecure;
2007-06-11 22:14:07 +00:00
</refsect1>
<refsect1 role= "parameters" >
&reftitle.parameters;
<para >
<variablelist >
<varlistentry >
<term > <parameter > str</parameter> </term>
<listitem >
<para >
The input string.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role= "returnvalues" >
&reftitle.returnvalues;
<para >
Returns the shuffled string.
</para>
</refsect1>
2017-02-20 22:01:10 +00:00
<refsect1 role= "changelog" >
&reftitle.changelog;
<para >
<informaltable >
<tgroup cols= "2" >
<thead >
<row >
<entry > &Version; </entry>
<entry > &Description; </entry>
</row>
</thead>
<tbody >
<row >
<entry > 7.1.0</entry>
<entry >
<link linkend= "migration71.incompatible.rand-srand-aliases" > The internal randomization algorithm has been changed to use the <link xlink:href= "&url.mersenne;" > Mersenne Twister</link> Random Number Generator instead of the libc rand function.</link>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
2007-06-11 22:14:07 +00:00
<refsect1 role= "examples" >
&reftitle.examples;
2007-06-11 22:13:26 +00:00
<para >
<example >
<title > <function > str_shuffle</function> example</title>
<programlisting role= "php" >
2003-01-18 09:22:40 +00:00
< ![CDATA[
< ?php
$str = 'abcdef';
$shuffled = str_shuffle($str);
2003-12-15 16:55:22 +00:00
// This will echo something like: bfdaec
echo $shuffled;
2003-01-18 09:22:40 +00:00
?>
]]>
2007-06-11 22:13:26 +00:00
</programlisting>
</example>
</para>
</refsect1>
2007-06-11 22:14:07 +00:00
<refsect1 role= "seealso" >
&reftitle.seealso;
<para >
<simplelist >
<member > <function > shuffle</function> </member>
<member > <function > rand</function> </member>
</simplelist>
</para>
</refsect1>
2007-06-11 22:13:26 +00:00
</refentry>
2003-01-18 09:22:40 +00:00
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
2009-09-25 07:04:39 +00:00
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
2003-01-18 09:22:40 +00:00
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->