Commit graph

7 commits

Author SHA1 Message Date
Juliette
41c8533ff5
PCRE: add missing "Errors/Exceptions" section
All PCRE pattern matching functions will throw a warning when an invalid regex is passed to the `$pattern` parameter.
See: https://3v4l.org/WkVIW

This was thus far undocumented behaviour.

This PR adds:
* The "Errors/Exceptions" section to each of the PCRE pattern matching function documentation pages (if it didn't exist yet).
* Adds a macro for the text snippet about the warning to display in the section and uses that in the "Errors/Exceptions" section for each function.

Co-authored-by: jrfnl <jrfnl@users.noreply.github.com>

Closes GH-1057.
2021-11-08 13:01:56 +01:00
Christoph Michael Becker
22e850b66c Generate pcre methodsynopses based on stubs
Based on a patch contributed by Máté Kocsis <kocsismate@woohoolabs.com>.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@351490 c90b9560-bf6c-de11-be94-00142212c4b1
2020-11-22 12:38:46 +00:00
Christoph Michael Becker
80872147aa Get rid of "callback" types
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@350788 c90b9560-bf6c-de11-be94-00142212c4b1
2020-10-06 09:11:05 +00:00
Christoph Michael Becker
5d3f4f8b94 PHP 7.4: PCRE: document new $flags param for preg_replace_callback[_array]()
The PHP 7.4 `$flags` parameter as added to the `preg_replace_callback()` and `preg_replace_callback_array()` function was not yet included in the documentation.

In this PR, I'm
* Adding the parameter to the function signature.
* Adding minimal parameter documentation with a reference to the more detailed explanation in the parameter documentation of the [`preg_match()`](https://www.php.net/manual/en/function.preg-match.php) function.
* Adding a changelog entry for the parameter to each function.

Refs:
* https://github.com/php/php-src/pull/3958
* 2f1398dad9/UPGRADING (L304-L308)

Patch contributed by jrfnl.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@349965 c90b9560-bf6c-de11-be94-00142212c4b1
2020-05-23 15:01:09 +00:00
Adam Harvey
72af2380f5 Cut down the preg_replace_callback_array() part of the migration guide.
I've removed the example: it was terrific, but the function reference has a
good example, and it was much too long for the page.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@337869 c90b9560-bf6c-de11-be94-00142212c4b1
2015-09-21 12:17:02 +00:00
Simion Onea
7050d96265 Corrected/added SVN properties, especially svn:keywords.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@337516 c90b9560-bf6c-de11-be94-00142212c4b1
2015-08-17 15:27:48 +00:00
Thomas Punt
03393b1f43 Added preg_replace_callback_array function
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@337413 c90b9560-bf6c-de11-be94-00142212c4b1
2015-08-12 15:39:47 +00:00