Create an XML sort.callback.description entity which contains the description of this parameter with the caution
Co-authored-by: George Peter Banyard <girgias@php.net>
Various functions and method have had their return type changed to true.
Fix this and add changelog entries.
Co-authored-by: George Peter Banyard <girgias@php.net>
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
The array_unique function doesn't sort, but compares.
It uses the same constants but terms are mixed up.
The text uses "sorting" while each constant uses "compare".
This is now streamlined in order to reduce friction while reading.
* Add an example showing how two associative arrays are combined
* Modernize array syntax in first example, use var_dump over print_r, revise wording, add types of fruits and vegetables into second example
* Add `array_merge()` to the "See Also" section
* Strengthen the wording in `&caution.cryptographically-insecure;`
It’s not: “should not”, it’s “must not”.
* random: Unify use of `&caution.cryptographically-insecure;`
- The warning goes last.
- It is actually applied to all functions.
* random: Completely rewrite the `&caution.cryptographically-insecure;` warning
* random: Revert indentation changes to lcg-value.xml
* random: Reference the corresponding Randomizer methods in random_(bytes|int)
* random: Cross-reference the Randomizer in `str_shuffle()`
* random: Cross-reference the Randomizer in `shuffle()`
* random: Cross-reference the Randomizer in `array_rand()`
* random: Cross-reference `random_bytes()` in `uniqid()`
* random: Do not cross-reference `uniqid()` in `openssl_random_pseudo_bytes()`
uniqid() really is no good alternative to *anything*. In the vast majority of
cases it is better replaced by `bin2hex(random_bytes(…))`.
* random: Replace the `mt_rand()` cross-reference in `openssl_random_pseudo_bytes()` with `random_int()`
random_int() is a CSPRNG like openssl_random_pseudo_bytes(), mt_rand() is not.
* Add a detailed description of what is meant by ASCII case conversion
to strtolower() and strtoupper().
* Replace locale-related text on ucfirst(), lcfirst() and ucwords()
with text about ASCII case conversion.
* Remove entity note.locale-single-byte since it was only used on
ucwords().
* Add changelog entries to all the functions mentioned in the RFC.
Co-authored-by: George Peter Banyard <girgias@php.net>
* Use spaceship where appropriate.
* Add example of multi-axes sorting with spaceship.
* Don't acknowledge the existence of PHP < 7
Co-authored-by: George Peter Banyard <girgias@php.net>
* Minor updates
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
Co-authored-by: George Peter Banyard <girgias@php.net>
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
The definition of `search_value` in "Parameters" is a bit ambiguous. "these values" _could_ be interpreted to mean that if an array is passed as the `$search_value`, keys of elements of `$search_value` that match _any_ of those `$array` elements will be returned.
Note, the "Description" section does not have this ambiguity as it states "that value" instead of "those values".
Closes GH-1429.
* Rewrite count() page
* Change methodname to interface name and fix example output
* Add example with Countable object
* Delete redundant code comments