php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49118 mb_ereg_replace can't replace to \\0
Submitted: 2009-07-31 07:35 UTC Modified: 2009-07-31 23:20 UTC
From: i-ito at ray dot co dot jp Assigned:
Status: Not a bug Package: mbstring related
PHP Version: 5.2.10 OS: CentOS5.3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: i-ito at ray dot co dot jp
New email:
PHP Version: OS:

 

 [2009-07-31 07:35 UTC] i-ito at ray dot co dot jp
Description:
------------
mb_ereg_replace can't replace to "\\0" ?


Reproduce code:
---------------
<?php
define("TEST_STRING_0","\x0");
define("TEST_STRING_1","\x1");
// works fine
echo mb_ereg_replace("\1", "\\1", TEST_STRING_1,"p");
// but not
echo mb_ereg_replace("\0", "\\0", TEST_STRING_0,"p");
// and also
echo mb_ereg_replace("\1", "\\0", TEST_STRING_1,"p");
?>


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-07-31 23:20 UTC] moriyoshi@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

"\\0" is a placeholder for the entire match.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 10:01:30 2024 UTC