952 Commits

Author SHA1 Message Date
Mikhail Alferov
a6ee935b0e wordwrap() Add errors/changelog sections, specify U+0020 instead U+20 (#3817)
---------

Co-authored-by: Gina Peter Banyard <girgias@php.net>
2024-10-03 13:06:32 +01:00
Daniel Aleksandersen
2ed0a46d44 Document where wordwrap() wraps (#1524)
* Document when wordwrap() wraps

---------

Co-authored-by: Jim Winstead <jimw@trainedmonkey.com>
2024-09-29 12:54:07 +01:00
Jim Winstead
cef78b0fbe Add explicit warning about CSV function's escape parameter (#3765) 2024-09-23 13:59:30 -07:00
Chris Brown
43cc4ed372 strncmp: Correct minor typo in example (#3768)
`are equals` vs `are equal`
2024-09-21 15:31:50 -07:00
Mikhail Alferov
523a0692f7 book.xml: add a link to the PCRE section (#3590) 2024-07-26 02:52:45 +01:00
haszi
48ce43fe79 Remove empty resources pages (#3545)
Co-authored-by: haszi <haszika80@gmail.com>
2024-07-26 02:17:29 +01:00
Mikhail Alferov
7efec4c29a strpos.xml: add the parameter tag to the offset (#3553)
* strpos.xml: add the `parameter` tag to the offset
* strpos.xml: mark numbers as `literal`
2024-07-11 23:45:11 +02:00
haszi
765b2d6eec Remove empty configuration pages (#3538)
Co-authored-by: haszi <haszika80@gmail.com>
2024-07-09 22:24:55 +01:00
Mikhail Alferov
3d38c9a1ce trim.xml: additionally describe the characters parameter (#3500)
* trim.xml: additionally describe the characters `parameter`

```<?php

$string = "foo123bar";

var_dump(
    trim($string, "a..z"), // 123
    trim($string, "a..Z"), // Warning: trim(): Invalid '..'-range, '..'-range needs to be incrementing
);```

* Update trim.xml: remove personalization
2024-07-09 19:40:36 +01:00
haszi
5cadfd39ba Add ALT_DIGITS constant (#3473)
Co-authored-by: haszi <haszika80@gmail.com>
2024-07-07 14:51:16 +01:00
Tim Düsterhus
71e12e2df7 Clean up “See Also” for hash*() (#3482)
* Clean up “See Also” for `hash*()`

Specifically remove the `md5*()` and `sha1*()` references, but also shorten the
lists in general: All hash functions are somewhat related, that does not mean
that each should reference each other.

see https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_md5_sha1_md5_file_and_sha1_file
see php/doc-en#2822

* Clean out “See Also” of `md5*()` and `sha1*()`
2024-07-07 14:47:57 +01:00
haszi
605553e228 Remove empty requirements pages (#3464)
Co-authored-by: haszi <haszika80@gmail.com>
2024-07-07 14:34:34 +01:00
haszi
bdef726773 Add replaceable tag to the appropriate nl_langinfo constants (#3442)
Co-authored-by: haszi <haszika80@gmail.com>
2024-06-14 16:06:05 +01:00
haszi
50ac73a352 Add individual ABDAY, DAY, ABMON and MON constants (#3440)
Co-authored-by: haszi <haszika80@gmail.com>
2024-06-14 16:05:26 +01:00
haszi
0d39e1f71e Add locale constant descriptions (#3441)
Co-authored-by: haszi <haszika80@gmail.com>
2024-06-14 16:05:01 +01:00
haszi
ccafc8c3c3 [skip-revcheck] Copy constants from nl_langinfo to constants page (#3299)
Co-authored-by: haszi <haszika80@gmail.com>
2024-05-27 13:30:51 +01:00
Máté Kocsis
d76a7fe17d Document SensitiveParameter attributes - part 2 (#3403) 2024-05-21 12:11:42 +01:00
Gina Peter Banyard
62126c55f1 Minor markup issue fixups 2024-04-22 13:25:39 +01:00
haszi
61374bbe22 Change literal to constant tags 2024-04-16 10:45:49 +01:00
Pierre Ambroise
c276fff86c Update strstr note (#3235)
Drive-by personalization removal

Co-authored-by: Gina Peter Banyard <girgias@php.net>
2024-03-05 22:36:57 +00:00
Sergey Panteleev
443d81b33e [PHP 8.3] Update functions (#3106)
Co-authored-by: Gina Peter Banyard <girgias@php.net>
2024-01-16 16:36:49 +03:00
Gina Peter Banyard
d369659c3f Add missing stristr 8.0 changelog 2023-11-18 04:48:44 +00:00
Jawira Portugal
1f0319dfed add link to multibyte version of str_pad (#2908) 2023-11-04 18:57:01 +09:00
Lu Fei
654ee5c8af Remove redundant spaces after strrchr() example update (#2886) 2023-10-26 01:54:21 +01:00
David CARLIER
a2ba966ef2 strrchr: typo fix (#2884) 2023-10-24 05:32:05 +08:00
vera-ju
36c24dc9fa Improve example for strrchr() (#2867) (#2873) 2023-10-20 12:55:38 +01:00
George Peter Banyard
57c83578be Document str_increment() and str_decrement() (#2797) 2023-10-06 12:59:18 +01:00
Tim Düsterhus
60b29fbe11 crypt: Improve comment in example (#2836)
see https://chat.stackoverflow.com/transcript/message/56738441#56738441
2023-10-03 17:21:54 -05:00
Tim Düsterhus
cc88cbd330 crypt: Do not reference md5() (#2790)
`md5()` should not be referenced anywhere, especially not anywhere near a
function that is suitable for hashing passwords.
2023-09-22 17:17:26 +01:00
Tim Düsterhus
58cdfe0ec9 crypt: Remove examples showcasing bad practices (#2789)
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).
2023-09-22 17:17:08 +01:00
miqrogroove
2eb2cdbe58 Corrected description of negative offsets for strrpos(). (#2221)
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.
2023-09-17 14:57:28 +01:00
Máté Kocsis
3b67c8e90c Synchronize predefined constants with stubs - part 2) (#2741)
Fix wrong formatting of constant types
2023-09-05 11:14:58 +01:00
Yoshinari Takaoka
31d54a1c34 Fixed $before_needle argument of strrchr() description (#2723)
* Fixed $before_needle argument of strrchr() description

* Make description of `$before_needle` consistent with `strstr()`

---------

Co-authored-by: Tim Düsterhus <tim@bastelstu.be>
2023-08-30 17:51:58 +02:00
HypeMC
ac9cbffe6e Document new $before_needle argument of strrchr() (#2719) 2023-08-30 12:56:43 +01:00
Houssem Zitoun
715a103ca5 Improve str_pad documentation (#2535) 2023-08-29 11:12:51 +01:00
Albert Peschar
272838c881 Add an example for str_getcsv with empty string (#2504)
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>
2023-08-15 17:23:49 +01:00
Alexandre Daubois
71b1e92663 Fix GH-2639: Mention empty needle is accepter as of PHP 8.0.0 in string functions (#2653) 2023-08-07 14:22:31 +01:00
Jorg Adam Sowa
de35b53845 Clarify the used rounding rule into the description of number_format() (#2538)
number_format() only uses the rounding half up rule. Other rules are not supported.
2023-06-26 16:22:50 +01:00
Martin Samesch
099842f342 Fix typo 2023-05-17 19:37:06 +02:00
Rowan Tommins
b676d0b9c9 Deprecation and alternatives for utf8_encode and utf8_decode (#2107) 2023-05-16 21:47:16 +01:00
MorganLOCode
125e2d067e Mention the use of '*' in printf-formatting specifiers (#2474)
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.
2023-05-15 14:17:02 +01:00
Daniel
f134250210 Update exceptions for sprintf, printf, fprintf, vsprintf, fprintf, and vfprintf (#2335)
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Co-authored-by: George Peter Banyard <girgias@php.net>
2023-05-09 12:15:05 +01:00
Kamil Tekiela
af30c6e8ac Fix strlen page (#2418) 2023-04-13 00:59:05 +01:00
homersimpsons
e1621b408b str-split: precise behavior change for PHP 8.2.0 (#2353) 2023-03-16 01:04:57 +00:00
Lode Claassen
49299f8b46 Fix typo in php8 example (#2271) 2023-02-08 18:14:08 +00:00
Protocol Corporation
1bf3ed99f6 Fix example in str_ends_with() (#2222) 2023-01-19 23:21:12 +01:00
Rowan Tommins
464fbf0d12 Better crosslinks between str_replace and preg_replace
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.
2022-12-22 18:18:14 +00:00
Yoshinari Takaoka
2bcb7a986d add parameter markup. 2022-11-21 12:44:03 +09:00
魔王卷子
7e348c185f Fix typo
Closes GH-2020.
2022-11-20 17:06:37 +01:00
Tim Düsterhus
52c495140b random: Clean up cross-references for randomness related functions (#2008)
* 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.
2022-11-15 11:19:28 +01:00