The existing examples showcased constant salts and the use of DES-based
hashing. Showcase a simple example of validating an existing SHA-512 crypt hash
with `1000000` rounds for compatibility with non-PHP software that relies on
libc's crypt (commonly mail servers or the OS's /etc/shadow).
Fixes GH-2220
The negative value for `strrpos` offset is inclusive of those bytes as a starting point, but was previously described as skipping those bytes.
* Fixed $before_needle argument of strrchr() description
* Make description of `$before_needle` consistent with `strstr()`
---------
Co-authored-by: Tim Düsterhus <tim@bastelstu.be>
It's surprising that `str_getcsv("")` returns `[null]`. This adds an
example to warn users of this behaviour.
Co-authored-by: George Peter Banyard <girgias@php.net>
When '*' is used to indicate width or precision in a formatting specifier, an additional integer argument is to be supplied which will provide the width/precision to be used.
The str_replace page had a helpful note that if you'd somehow got
there when you were looking for preg_replace, you didn't need to
llok further. But if you were actually on the page for preg_replace,
there was no link to str_replace at all, not even in the See Also
section.
* 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>