#43789 [Opn->Csd]: Missing information about preg_replace() returning null
| From: | felipe@php.net | Date: | Wed, 09 Jan 2008 00:17:49 +0000 |
| Subject: | #43789 [Opn->Csd]: Missing information about preg_replace() returning null | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-427@lists.php.net to get a copy of this message | ||
ID: 43789
Updated by: felipe@php.net
Reported By: david at dfoerster dot de
-Status: Open
+Status: Closed
Bug Type: Documentation problem
Operating System: Linux
PHP Version: Irrelevant
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation
better.
Previous Comments:
------------------------------------------------------------------------
[2008-01-08 22:22:27] david at dfoerster dot de
Description:
------------
I just filled a bogus bug report about preg_replace() returning
null. (http://bugs.php.net/bug.php?id=43788) I guess this was
introduced with preg_last_error in PHP 5.2 and should be documented.
I guess this applies to other preg_* functions as well.
Reproduce code:
---------------
Read the online documentation to preg_replace.
Expected result:
----------------
Return Values
preg_replace() returns an array if the subject parameter is an
array, or a string otherwise.
If matches are found, the new subject will be returned, otherwise
subject will be returned unchanged. If an error occurs, null (or
false ?) will be returned and the error will be available through
preg_last_error().
Actual result:
--------------
Return Values
preg_replace() returns an array if the subject parameter is an
array, or a string otherwise.
If matches are found, the new subject will be returned, otherwise
subject will be returned unchanged.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=43789&edit=1