|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41807 ereg_replace adds a ‘ at the end of output
Submitted: 2007-06-26 08:13 UTC Modified: 2007-07-05 01:00 UTC
Avg. Score:2.0 ± 1.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: untxen at gmail dot com Assigned:
Status: No Feedback Package: Unknown/Other Function
PHP Version: 4.4.7 OS: Debian
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2007-06-26 08:13 UTC] untxen at gmail dot com
function ereg_replace seems to add the replacement string at the end of the string when the replacement is a special character (utf-8 code) and the pattern is \'.

using mb_ereg_replace the problem is solved, but ereg_replace works wrong

Reproduce code:
echo ereg_replace("\'","‘","hola");

Expected result:
I expect this as a result:


because there isn't a ‘ in text hola

Actual result:
it actually outputs:



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-06-27 11:36 UTC]
Cannot reproduce.
 [2007-07-05 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jun 16 19:01:30 2024 UTC