1
0
mirror of https://github.com/php/doc-en.git synced 2026-03-26 16:52:25 +01:00
Commit Graph

906 Commits

Author SHA1 Message Date
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
Tim Starling
54ff7bf8e0 Updates for RFC: Locale-independent case conversion (#1934)
* 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>
2022-11-07 14:17:15 +00:00
zing-james
a484d5d2bb Update return value for levenshtein
The character limit on the 2 string arguments for the levenshtein function was removed in PHP 8.

6a8c094e2d

Closes GH-1892.
2022-10-17 10:09:39 +02:00
David CARLIER
a3573c18b8 Update string comparisons possible returns
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>

Closes GH-1857.
2022-10-06 16:10:48 +02:00
Sugiuro
679363b2b5 Align example (#1775) 2022-08-28 17:29:05 +01:00
Christoph M. Becker
e35fbbaa52 parse_str()'s $result is mandatory as of PHP 8.0.0 2022-08-23 15:12:37 +02:00
Christoph M. Becker
2526581912 The salt is no longer optional as of PHP 8.0.0
Cf. <https://github.com/php/doc-en/issues/1752#issuecomment-1216980812>.
2022-08-16 20:11:42 +02:00
Christoph M. Becker
cbc23f1a74 Fix GH-1752: crypt() update docs wrt. no longer optional $salt 2022-08-16 20:07:30 +02:00
Sergey Panteleev
b6f10b97e0 [PHP 8.2] Deprecate utf8_* functions (#1743) 2022-08-11 13:24:18 +03:00
Nicolas Dermine
9a3f4c5662 Fix typo (comparision → comparison)
Closes GH-1701.
2022-07-18 10:55:08 +02:00
Larry Garfield
dc63dfd214 Clarify error handling and other behvaior of str_split
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>

Closes GH-1665.
2022-07-03 20:12:16 +02:00
Kamil Tekiela
f7f0e997b5 Remove old crypt bug info (#1667) 2022-06-30 14:20:07 +01:00
Christoph M. Becker
36a894a627 Fix #1566: crypt(): --with-external-libcrypt undocumented 2022-05-23 16:09:37 +02:00
Christoph M. Becker
4225e50bc3 Fix GH-1571: f/sscanf() do not mention assignment suppression feature 2022-05-09 14:49:30 +02:00
Morgan Arnel
840ed22479 Clarify which characters are translated by htmlentities
Closes GH-1438.
2022-04-22 14:18:25 +02:00
George Peter Banyard
a223531900 Fix section order issues introduced by 99d758bd25 2022-04-04 18:05:11 +01:00
Rowan Tommins
99d758bd25 Improve documentation of string encoding conversion functions
- Move utf8_encode and utf8_decode into the strings chapter, since
  they were moved out of the XML extension in 7.2
- Recommend mb_convert_encoding, iconv, and UConverter::transcode
  when mentioning encoding in passing
- Document UConverter::transcode, based on examination of source
  and upstream ICU docs
- Make the language used more consistent, e.g. "convert" rather
  than "encode"/"decode", "encoding" rather than "charset"

Closes GH-1418.
2022-04-04 12:24:24 +02:00
Sergey Panteleev
6330e4d731 Add examples for string functions (#1477) 2022-03-31 10:41:58 -05:00
Kévin Dunglas
15247c75e1 False isn't allowed for substr()'s $length (#984) 2022-03-30 16:37:31 -05:00
Steve Thomas
f93ab9943c password_verify is capable of verifying crypt hashes
Closes GH-1424.
2022-02-22 17:15:50 +01:00
Peter
560262a557 Update strlen documentation for PHP8
Length parameter to substr() behaves differently for PHP8+. It recognizes null as if no value was provided at all. Updated the documentation to reflect this.

Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>

Closes GH-1219.
2022-02-10 12:53:41 +01:00
Gabriel Millian
7d1b425bd7 Fix typo (case-insentive → case-insensitive)
Closes GH-1354.
2022-01-21 23:47:49 +01:00
Christoph M. Becker
98ba3bd97a Fix #1328: bcrypt max password length is about bytes, not characters 2022-01-14 13:45:21 +01:00
Kamil Tekiela
c1adec107f Add mb_str_split to see also in str_split
Closes GH-1309
2022-01-07 16:05:46 +00:00
Máté Kocsis
eabde0419c Update some string function parameter default values (#1272) 2021-12-30 14:03:52 +01:00
Máté Kocsis
769812c12f Generate various ext/standard method synopses from stubs - part 5 (#1232) 2021-12-22 12:34:12 +01:00
Kamil Tekiela
5dfba3d91f Add more implode examples
Closes GH-1195.
2021-12-13 14:07:29 +01:00
Sergey Panteleev
e4b52745bc Fix html.c functions description (#1052)
Closes #1042
2021-10-27 11:50:38 +03:00
Tobias Bäthge
422bb03223 strspn() and strcspn(): Use proper parameter names in docs reference
* strspn(): Use proper parameter names in docs reference

Commit e095023e40 renamed the `$subject`, `$mask`, and `$start` parameters of the `strspn()` function to `$string`, `$characters`, and `$offset`, respectively. The three instances in the code example were missed.

* strcspn(): Use proper parameter names in docs reference

Commit e095023e40 renamed the `$subject`, `$mask`, and `$start` parameters of the `strcspn()` function to `$string`, `$characters`, and `$offset`, respectively. The three instances in the code example were missed.

Closes GH-977.
2021-09-28 11:39:53 +02:00
Craig Francis
eff487cfb3 Use 'ENT_QUOTES|ENT_SUBSTITUTE' for HTML encoding and decoding functions (#361) 2021-09-23 14:00:33 +01:00
Christoph M. Becker
89ee07c72d Match substr() description to its signature
substr() no longer returns false as of PHP 8.0.0.
2021-09-09 18:04:26 +02:00
Christoph M. Becker
abd75f51f4 explode() no longer returns false as of PHP 8.0.0
See also <https://bugs.php.net/bug.php?id=42129>.
2021-08-23 17:50:27 +02:00
JumiDeluxe
89a80389d4 Fix typo in stripos returnvalues (#848) 2021-08-12 20:00:49 +01:00
Christoph M. Becker
5dcdcf32f8 Fix #70799: strcasecmp is not locale aware 2021-07-30 13:01:43 +02:00
Christoph M. Becker
7d93e0fe5e Fix #81284: str_getcsv cant parse with multibyte delimiter
There's no fun in DRY. ;)
2021-07-23 17:24:39 +02:00
Tiffany
0e81411492 Additional revisions to ucwords
Closes GH-727.
2021-06-27 12:30:10 +02:00
Kamil Tekiela
9d2b858bca Remove magic_quotes_runtime docs
Closes GH-719.
2021-06-25 19:27:30 +02:00
Tiffany
552f92a2ec Revise wording for ucwords (#726) 2021-06-24 09:30:02 -05:00
Kamil Tekiela
d335ba69a1 Remove split() and ereg()
Closes GH-716.
2021-06-23 20:20:58 +02:00
Sergey Panteleev
715a125af5 Fix section order issues (#664)
* Added parameters section for Tidy
* Fix section order for Svn
* Fix section order for Strings
2021-06-07 11:12:12 +03:00
colshrapnel
f1def1dea9 Add a note to strtok
* Add a note to strtok 

There are some nuances, explained in the strtok man page, https://man7.org/linux/man-pages/man3/strtok.3.html namely starting, ending and duplicated tokens are ignored.

Co-authored-by: Kamil Tekiela <tekiela246@gmail.com>

Closes GH-643.
2021-06-01 14:27:01 +02:00
Máté
c44475e1fa Generate methodsynopses based on stubs for Zend functions and methods
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>

Closes GH-168.
2021-05-22 16:48:16 +02:00
Sergey Panteleev
8cdc6621f9 Remove PHP 5, 7 references (#563)
- array functions
- datetime functions
- mbstring functions
- strings functions
- var functions
- xml functions
- json functions
2021-05-16 22:07:40 +03:00
George Peter Banyard
c69c209823 Fix explode() changelog entry
Drive-by indentation fix of the section
2021-05-01 19:14:48 +01:00
Kim Hallberg
6b5de328b9 Fix #80975: Doc incomplete - explode
* Add TypeError to changelog
* Add note about seperator values at start of end of string

Closes GH-558.
2021-04-29 18:03:25 +02:00
Sergey Panteleev
a0ae28d3bc Removed references to PHP 5, PHP 7.0 (#545) 2021-04-24 20:01:17 +03:00
Andrew Foster
7a3899eea9 Fix double "language" (#538) 2021-04-20 13:39:32 +08:00