php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1380 str_replace() doesn't replace occurence of needle at the end of the haystack
Submitted: 1999-05-06 06:09 UTC Modified: 1999-05-11 07:49 UTC
From: m dot krause at tu-harburg dot de Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 3.0.7 OS: Linux
Private report: No CVE-ID: None
 [1999-05-06 06:09 UTC] m dot krause at tu-harburg dot de
<?php
$string = "F.F.F.";
$string = str_replace("F.", "A", $string);
echo htmlspecialchars($string);
?>

displays "AAF." instead of "AAA"

http://www.tu-harburg.de/~semk2104/php-3.0.7-str_replace-patch

has a fix for this!

keep on the good work on PHP!
- michael

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-05-11 07:49 UTC] sas at cvs dot php dot net
Fixed in CVS. Thanks for the patch.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sun Oct 11 23:00:01 2026 UTC