php.net |  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
Votes:2
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
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: untxen at gmail dot com
New email:
PHP Version: OS:

 

 [2007-06-26 08:13 UTC] untxen at gmail dot com
Description:
------------
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:

hola


because there isn't a ‘ in text hola

Actual result:
--------------
it actually outputs:

hola‘

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-06-27 11:36 UTC] tony2001@php.net
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: Sat Dec 21 13:01:31 2024 UTC