Commit graph

19608 commits

Author SHA1 Message Date
Derick Rethans
c7ee9cd4d1 Fixed bug #74234: DateTimeZone supported timezone names 2022-06-02 15:57:12 +01:00
Derick Rethans
33dd071b0d Fixed bug #72586: Document that order of characters is important 2022-06-02 15:29:47 +01:00
Derick Rethans
fc1c548fab Fixed bug #71108: date_create() is NOT an alias for 'new DateTime()' 2022-06-02 12:18:03 +01:00
Derick Rethans
7bcd434e88 Fixed bug #70463: Document precise date/time parser 2022-06-02 12:10:15 +01:00
Derick Rethans
bbfdc364de Swap DateTime and DateTimeImmutable documention to push people towards using DateTimeImmutable 2022-06-02 11:44:54 +01:00
Derick Rethans
850f18db7f Fixed duplicated > 2022-06-02 11:44:10 +01:00
Derick Rethans
cf25abe5d0 Fixed bug #70154: date_parse() not returning false for missing time components 2022-06-02 10:41:33 +01:00
Máté Kocsis
b2ee26630c
Sync ext/tidy properties with stubs (#1599) 2022-05-30 16:28:22 +02:00
Martin Krisell
9fc8bcc083
Clarify aad parameter in openssl_encrypt/decrypt
Closes GH-1603.
2022-05-30 15:16:44 +02:00
Pierrick Charron
08e0e7dd68
Replace each() with foreach in usort and simplexmlelement/xpath 2022-05-26 13:16:41 -04:00
Michal Špaček
6be77ad626
Argon2's memory_cost is in kilobytes, not bytes
https://www.php.net/password-hash says "kibibytes", spec https://www.password-hashing.net/argon2-specs.pdf says "kilobytes", went with "kibibytes" to match the other docs page.

Closes GH-1596.
2022-05-25 19:39:34 +02:00
Christoph M. Becker
36a894a627
Fix #1566: crypt(): --with-external-libcrypt undocumented 2022-05-23 16:09:37 +02:00
Christoph M. Becker
3d9dad29c7
Fix bug #67034: Unable to compare DateInterval instances with == operator
Closes GH-1590.
2022-05-23 11:31:55 +02:00
Rochdi Nassah
9ed2d17d58
Typo (#1593) 2022-05-22 19:31:50 +01:00
Zebulan Stanphill
12ce6e72ca
Fix: Ds\Collection extends IteratorAggregate
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>

Closes GH-1587.
2022-05-20 17:57:46 +02:00
Derick Rethans
9ff98b3827 Fixed bug #76378: strftime format "%p" is not always uppercase "AM/PM" 2022-05-20 15:45:29 +01:00
Kamil Tekiela
09f4a3f040
Reword parameter description of set_exception_handler (#1004) 2022-05-18 17:56:55 +01:00
Christoph M. Becker
214519fdbd
Fix GH-1586: Changed error behavior in array_chunk in php 8 2022-05-18 14:55:27 +02:00
Marko Kaznovac
4a26c016c3
Fix memcached.get $$flags (#1585) 2022-05-17 16:01:56 +03:00
Kamil Tekiela
77887dc8e5
Improve resource functions examples (#1435) 2022-05-16 15:20:33 +01:00
Christoph M. Becker
4b3eb0a80c
Drop half-finished clause
Cf. <fd8fcbcd6f (r73701907)>.
2022-05-16 10:24:34 +02:00
Derick Rethans
d836dea93e Fixed #69176: strtotime: support "first/last of" with weeks 2022-05-13 15:47:06 +01:00
Derick Rethans
5267e13731 Fixed bug #67921: createFromFormat allows overflow for 'H' and 'G' so 25-99 rolls to next day 2022-05-13 15:27:53 +01:00
Derick Rethans
43709b0d94 Merge branch 'master' of https://github.com/php/doc-en 2022-05-13 15:15:57 +01:00
Derick Rethans
fd8fcbcd6f Fixed bug #66510: Clarify the return values of DateTimeZone::listAbbreviations 2022-05-13 15:15:43 +01:00
Sergey Panteleev
4a41b3c620
Fix the build 2022-05-13 14:08:44 +03:00
Derick Rethans
8cc12de858 Fixed bug #45509: Clarify ocumentation for DateTime::format and DateTime::createFromFormat's 'Y' character 2022-05-13 11:24:02 +01:00
Derick Rethans
5e865c822b Document new 'N' and 'o' letters (ISO-8601 day-of-the-week, and ISO-8601 year) 2022-05-13 10:05:31 +01:00
Christoph M. Becker
aa471e2d84
filter.default is deprecated as of PHP 8.1.0 2022-05-12 13:46:53 +02:00
Christoph M. Becker
a3eab3abd6
ZipArchive::getExternalAttributesIndex(): use canonical capitalization 2022-05-10 20:14:06 +02:00
Christoph M. Becker
ad618eea48
Remove grossly outdated info about PHP 4.0.3 requirement 2022-05-09 16:02:38 +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
Christoph M. Becker
46048f1cb2
Fix GH-1576: New opcache.record_warnings setting is undocumented 2022-05-09 10:49:39 +02:00
Christoph M. Becker
f004f576e7
Fix GH-1575: get_parent_class may return false 2022-05-07 13:20:49 +02:00
Christoph M. Becker
1af58f6311
Fix GH-1568: No info on return value of ctype_alnum() in case of empty string
We explicitly add the info to every ctype's function return value
section.

We also overhaul the ctype introduction section by removing obsolete
information, adding a warning about the deprecation of int parameters,
and removing personalization.
2022-05-06 17:53:06 +02:00
Christoph M. Becker
7fc84e37b7
Fix GH-1569: gzdecode raises Warning on invalid data
We keep that unspecific, at least for now.
2022-05-06 17:18:41 +02:00
Christoph M. Becker
ce9a6b3a30
Clarify where Windows users can get the SNMP mib files
Judging from the user notes, there is apparently some confusion, so we
add a link.

While we're at it, we also fix the grammar and mark-up.
2022-05-06 13:56:22 +02:00
Ollie Read
8d2b545eef
Add missing documentation for the ReflectionClass::getAttributes method
Closes GH-1539.
2022-05-03 13:08:20 +02:00
Christoph M. Becker
6105486171
Fix enable_dl description
`enable_dl` is certainly not useful for the Apache module version of
PHP, since `dl()` is removed from that SAPI as of PHP 5.3.0.

I'm not sure about the `&removed.php.future;` in the summary table. Is
`enable_dl` indeed deprecated and will certainly be removed in the
future, or is that out-dated info which referred to certain SAPIs?
2022-05-02 18:13:25 +02:00
Christoph M. Becker
6c7300690f
Update Enchant installation instructions
As of PHP 8.0.0, Windows uses Enchant-2 by default, and that looks for
the providers in a different folder (what is no longer changeable via
the Registry).

We also remove the outdated PHP 5 related information.
2022-05-02 18:05:14 +02:00
Christoph M. Becker
7639cf8773
ZTS support doesn't forbid/disable dl()
The apparently erroneous note might stem from the respective error
message[1].

[1] <https://github.com/php/php-src/blob/PHP-5.3/ext/standard/dl.c#L76-L86>
2022-05-02 17:46:01 +02:00
Martin Rehberger
c1da6cc7c2
Fix type for index in ZipArchive::replaceFile()
Closes GH-1563.
2022-05-02 14:31:28 +02:00
Christoph M. Becker
34a35a3681
Fix GH-1561: SplPriorityQueue & friends don't have a constructor 2022-04-29 14:32:03 +02:00
Calvin Buckley
ae6a2efed7
Link to the drivers, since it's not obvious what it's meant
Closes GH-1552.
2022-04-28 15:03:54 +02:00
Sergey Panteleev
ed8eead5c4
[PHP 8.1] Add ReflectionFunctionAbstract::getClosureUsedVariables (#1032)
Co-authored-by: Máté Kocsis <kocsismate@woohoolabs.com>
2022-04-28 09:58:00 +03:00
Christoph M. Becker
da9e1ca208
Collator::create() does not accept null
Cf. <https://github.com/php/doc-en/pull/1551#issuecomment-1110886470>.
2022-04-27 13:43:07 +02:00
Christoph M. Becker
69e0955f7b
Fix GH-1550: Collator::__construct() does not accept null 2022-04-27 12:24:11 +02:00
Calvin Buckley
1d06977916
All drivers implement getColumnMeta
Since php/php-src@caa710037e, all bundled
drivers (Firebird and ODBC being the omissions before) implement this
function. The third-party drivers, even the ones in massive states of
disrepair, support it too. It's still optional, so a new PDO driver
could take us by surprise, but the list is misleading, so just include
the warning.

Closes GH-1548.
2022-04-27 11:03:16 +02:00
Sergey Panteleev
6154d9c466
[PHP 8.1] Add new global Sodium constants (#1546) 2022-04-26 15:47:45 +03:00
Sergey Panteleev
928f051323
[PHP 8.1] Add new global GD constants (#1545) 2022-04-26 15:22:29 +03:00
Christoph M. Becker
5fc91f8abb
Closes GH-1543: get_magic_quotes_*() is deprecated 2022-04-26 12:19:16 +02:00
Christoph M. Becker
6ecb3d2522
Remove grossly outdated info (#1538)
It seems that line endings are handled in a style agnostic way by
`get_meta_tags()` for a long time now[1].  Thus, we drop the apparently
outdated info.

[1] <60fffd296a/ext/standard/file.c (L2442-L2445)>
2022-04-22 17:05:25 +01:00
Ollie Read
a7e787f40f
Add missing constant definition ReflectionAttribute::IS_INSTANCEOF
Closes GH-1537.
2022-04-22 17:54:17 +02:00
Morgan Arnel
840ed22479
Clarify which characters are translated by htmlentities
Closes GH-1438.
2022-04-22 14:18:25 +02:00
Christoph M. Becker
20ddc39b6a
Fix GH-1529: Missing documentation of second parameter of imagick.writeimagefile 2022-04-20 19:10:53 +02:00
Máté Kocsis
2d0fa22cc2
Adjust formatting of intldatepatterngenerator.xml according to gen_stub.php (#1531) 2022-04-20 16:02:47 +02:00
Máté Kocsis
0cdbd6ddab
Sync ext/dom properties with stubs - part 2 (#1297) 2022-04-20 14:49:00 +02:00
Máté Kocsis
08f35ae7dc
Sync ext/dom properties with stubs - part 1 (#1295)
Co-authored-by: George Peter Banyard <girgias@php.net>
2022-04-20 14:48:26 +02:00
George Peter Banyard
ee12b637d1
Remove PHT docs (#1530)
See https://github.com/tpunt/pht/issues/11
2022-04-20 12:39:11 +01:00
Máté Kocsis
6d48923b82
Reorder DOMDocument properties (#1335) 2022-04-20 13:03:27 +02:00
Kamil Tekiela
772cf37c3f
Added missing code comment 2022-04-17 18:16:01 +01:00
Sergey Panteleev
133b912de1
[PHP 8.1] Add sodium ristretto255 functions (#1051) 2022-04-16 13:56:04 +03:00
Sergey Panteleev
42d9fd4535
Add sodium xchacha20 functions (#1045) 2022-04-16 13:55:13 +03:00
Martin Samesch
96f69db3ae
Typo 2022-04-14 15:08:46 +02:00
Máté Kocsis
bc3e9a2933
Generate methodsynopses for ext/intl (idna, IntlChar) (#905) 2022-04-14 08:35:42 +02:00
Máté Kocsis
ef3ba2aad1
Generate ext/intl methodsynopses based on stubs (IntlTimeZone) (#911) 2022-04-13 21:50:57 +01:00
Lars Moelleken
f3534a2ab0
Clarify NULL is not a scalar in is-scalar.xml() docs (#1515) 2022-04-13 21:35:58 +01:00
Christoph M. Becker
3a2e96fcc0
Fix type of 2nd parameter of openssl_csr_export()
Cf. <https://github.com/php/php-src/pull/8362>.
2022-04-13 15:35:04 +02:00
Rowan Tommins
6105da168f
Rewrite SoapClient constructor documentation
This constructor takes a large number of options, most of which
were effectively undocumented, leading to a very high volume of
User Notes. Some examples and caveats from these notes have been
incorporated.

The descriptions here are largely based on reverse-engineering
the source code (which isn't particularly well commented) and
experimenting locally, so may not be 100% accurate, or capture
differences between versions.
2022-04-12 13:33:55 +02:00
Sergey Panteleev
764e22fefc
Update array_combine return values section (#1513)
Fix #1512
2022-04-12 13:24:42 +03:00
Yoshinari Takaoka
e3ac07c850
moved too long title to <para></para> contents. 2022-04-09 17:49:08 +09:00
Larry Garfield
706c7ac6ea
Usort updates based on comments (#1492)
* 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>
2022-04-08 11:24:38 -06:00
Larry Garfield
8d7f21b1c1
register_shutdown_function() updates based on comments (#1493)
* Note that shutdown functions may still register shutdown functions.

* Add note about max execution time.

* Add cross reference to fastcgi_finish_request.

* Correct grammar.
2022-04-08 11:19:19 -06:00
George Peter Banyard
fe5841adc7 Remove return value section for Intl constructors 2022-04-08 00:49:02 +01:00
George Peter Banyard
967b4787ba Remove return value section for Reflection constructors 2022-04-08 00:45:55 +01:00
George Peter Banyard
fda6c4efe2
Update SPL class construtor pages (#1466)
Add missing changelogs for changes in PHP 8
2022-04-07 12:40:48 +01:00
Derick Rethans
15244038c7 Updated to version 2022.1 (2022a) 2022-04-07 10:38:32 +01:00
George Peter Banyard
c44e9cb68b
Fix some (con|de)structor pages (#1507)
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
2022-04-06 18:55:35 +01:00
Christoph M. Becker
8a9c2ca098
Link to mb_encoding_aliases() from mb_list_encodings() 2022-04-06 12:51:55 +02:00
Martin Samesch
39752929cd
Typo 2022-04-06 12:04:02 +02:00
Rowan Tommins
5065e44c26
Add closure versions of all create_function examples
Basically the only reason people should be looking at the manual
for create_function right now is to see how *not* to use it. So,
for every example that was already included, I've added the
corresponding version using real anonymous functions.

Also, I've reworded the purpose and description, because these
functions aren't anonymous, as evidenced by the return value being
their name.

Closes GH-1500.
2022-04-05 13:59:01 +02:00
Christoph M. Becker
a8b575aeac
Fix GH-1478: strftime is deprecated as of PHP 8.1 but no mention of what to use instead 2022-04-05 13:50:13 +02:00
Máté Kocsis
c55ff133ad
Annotate readonly ext/mysqli properties (#1505) 2022-04-05 13:48:02 +02:00
George Peter Banyard
73fae4ee51
Fix syntax errors in examples (#1504) 2022-04-05 11:15:46 +01:00
David Grudl
14a60fad6e
Fixed info about @ operator (#1196)
- UPGRADING says that the error_reporting (ie. value returned by error_reporting() or ini_get('error_reporting ')) is changed, not the severity value passed to the handler.
- UPGRADING says that the error_reporting() == 0 should be replaced with !(error_reporting() & $err_no) in code, not the return with return false. So there is currenctly no way how to detect @ operator.
- "Prior to PHP 8.0.0, the value of the severity passed to the custom error handler was always 0" - no true
- "return false; // Silenced" - not true, if the function returns false then the normal error handler continues, so it is not "silenced".

(partially reverts "Cleanup and update docs related to @ operator" commit 12b1d4704ea448b55ec155619be1e50c0e67e9f9.)

Co-authored-by: George Peter Banyard <girgias@php.net>
Co-authored-by: Larry Garfield <larry@garfieldtech.com>
2022-04-04 20:28:18 +01:00
George Peter Banyard
ca1c139b22 Fix extension membership for igbinary extension 2022-04-04 18:34:26 +01:00
George Peter Banyard
a223531900 Fix section order issues introduced by 99d758bd25 2022-04-04 18:05:11 +01:00
USAMI Kenta
d4d537e6a2
PDO::MYSQL_ATTR_LOCAL_INFILE_DIRECTORY was added in PHP 8.1
The first change mentioned in the manual for PDO::MYSQL_ATTR_LOCAL_INFILE_DIRECTORY was 03f0ebc60c.

Then 607ec1f63c stated about the version to which the constant was added.
However, it incorrectly appends to `MYSQL_ATTR_LOCAL_INFILE` instead of `MYSQL_ATTR_LOCAL_INFILE_DIRECTORY`.

Closes GH-1502.
2022-04-04 13:12:22 +02: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
Fabien Salathe
8b0e03372d
Remove "experimental" warning from Foreign Function Interface
Foreign Function Interface (FFI) has been introduced in 2019 (PHP 7.4) and the API didn't change since then, it should probably be considered safe to use it.

Closes GH-1495. Closes GH-1499.
2022-04-02 18:13:26 +02:00
George Peter Banyard
42aa8713e3 Fix section order in Imagick docs 2022-04-02 15:40:34 +01:00
George Peter Banyard
e84773a605
Add missing parameter sections for PDO methods (#1459) 2022-04-02 15:34:36 +01:00
George Peter Banyard
45ac957ca5 Add docs for SoapClient::__call() based on SoapClient::__soapCall()
Also drive-by fixes to both __call() and __soapCall() in regards to markup
2022-04-02 13:16:38 +01:00
Jakub Zelenka
87d151824d Document gnupg_listsignatures 2022-03-31 20:48:26 +01:00
Jakub Zelenka
1ea36ad22a Document gnupg_gettrustlist 2022-03-31 20:48:00 +01:00
Jakub Zelenka
91db48f3b3 Document gnupg_deletekey 2022-03-31 20:47:27 +01:00
Sergey Panteleev
6330e4d731
Add examples for string functions (#1477) 2022-03-31 10:41:58 -05:00
Sergey Panteleev
58c419eb2e
[PHP 8.1] Add pcntl_rfork description (#1033) 2022-03-31 10:41:26 -05:00
Máté Kocsis
72d156e206
Sync DirectoryIterator method return types (#1293) 2022-03-31 08:34:47 +02:00
Kévin Dunglas
15247c75e1
False isn't allowed for substr()'s $length (#984) 2022-03-30 16:37:31 -05:00