php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #49685 Docs: What does preg_replace_callback() do on error?
Submitted: 2009-09-27 09:37 UTC Modified: 2009-10-02 20:31 UTC
From: malvineous at shikadi dot net Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: malvineous at shikadi dot net
New email:
PHP Version: OS:

 

 [2009-09-27 09:37 UTC] malvineous at shikadi dot net
Description:
------------
The manual page for preg_replace_callback() explains the return values but it doesn't say what will happen on error, e.g. bad regex or unsupported modifier.  Will it return null?  Or false?  Or something else?

Reproduce code:
---------------
---
From manual page: function.preg-replace-callback#Return Values
---



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-10-02 20:31 UTC] svn@php.net
Automatic comment from SVN on behalf of fa
Revision: http://svn.php.net/viewvc/?view=revision&revision=289097
Log: fix #49685 - returns NULL on errors
 [2009-10-02 20:31 UTC] fa@php.net
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.


 [2020-02-07 06:10 UTC] phpdocbot@php.net
Automatic comment on behalf of fa
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=bbd0696ac152578b4c8017483f6c5f7504fb81e1
Log: fix #49685 - returns NULL on errors
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 20:00:02 2026 UTC