[prev in list] [next in list] [prev in thread] [next in thread]
List: php-doc-cvs
Subject: [DOC-CVS] [doc-en] master: random: Add description to Randomizer::pickArrayKeys() (#2010)
From: Tim_Düsterhus_via_GitHub <noreply () php ! net>
Date: 2022-11-15 11:18:07
Message-ID: lLttyvjThGd6Su7003ohHCmyjRnP1fCw1JORU2VhM () main ! php ! net
[Download RAW message or body]
Author: Tim Düsterhus (TimWolla)
Committer: GitHub (web-flow)
Pusher: TimWolla
Date: 2022-11-15T12:07:27+01:00
Commit: https://github.com/php/doc-en/commit/501c662caafcde4ccc11efcc37d9cd9fd21d1c0b
Raw diff: https://github.com/php/doc-en/commit/501c662caafcde4ccc11efcc37d9cd9fd21d1c0b.diff
random: Add description to Randomizer::pickArrayKeys() (#2010)
Changed paths:
M reference/random/random/randomizer/pickarraykeys.xml
Diff:
diff --git a/reference/random/random/randomizer/pickarraykeys.xml \
b/reference/random/random/randomizer/pickarraykeys.xml index 02a044af59a..46bb9f478fa \
100644
--- a/reference/random/random/randomizer/pickarraykeys.xml
+++ b/reference/random/random/randomizer/pickarraykeys.xml
@@ -13,11 +13,19 @@
<methodparam><type>int</type><parameter>num</parameter></methodparam>
</methodsynopsis>
<para>
-
+ Uniformly selects <parameter>num</parameter> distinct array keys of the input \
<parameter>array</parameter>. </para>
-
- &warn.undocumented.func;
-
+ <para>
+ Each key of the input <parameter>array</parameter> is equally likely to be \
returned. + </para>
+ <caution>
+ <para>
+ The selection of the array keys depends on the internal structure of the input
+ <parameter>array</parameter>. The returned array keys might be different for
+ two equal input arrays and two <classname>Random\Engine</classname>s with
+ identical state, depending on how the input arrays have been created.
+ </para>
+ </caution>
</refsect1>
<refsect1 role="parameters">
@@ -46,7 +54,11 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
- An array containining <parameter>num</parameter> distinct array keys of \
<parameter>array</parameter>. + An &array; containing <parameter>num</parameter> \
distinct array keys of <parameter>array</parameter>. + </para>
+ <para>
+ The returned &array; will be a list (<function>array_is_list</function>). It will \
be a subset + of the &array; returned by <function>array_keys</function>.
</para>
</refsect1>
@@ -86,6 +98,12 @@
</example>
</refsect1>
+ <refsect1 role="seealso">
+ &reftitle.seealso;
+ <simplelist>
+ <member><function>array_keys</function></member>
+ </simplelist>
+ </refsect1>
</refentry>
<!-- Keep this comment at the end of the file
--
PHP Documentation Commits Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic