php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62248 str_replace() with multiple replacing
Submitted: 2012-06-07 05:33 UTC Modified: 2012-06-07 05:54 UTC
Votes:1
Avg. Score:1.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: EternalEssence at yandex dot ru Assigned:
Status: Not a bug Package: Strings related
PHP Version: 5.3.13 OS: Windows 7 / Debian / etc?
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: EternalEssence at yandex dot ru
New email:
PHP Version: OS:

 

 [2012-06-07 05:33 UTC] EternalEssence at yandex dot ru
Description:
------------
PHP: 5.3, 5.4
Unicode: not


Test script:
---------------
// 1. Works (output "<1>")
die(str_replace(
	array('{a1}', '{b1}', '{c1}', '{d1}'),
	array('a1', '', '1', 'd1'),
	'{b1} <{c1}>'
));

// 2. Error (output nothing)
die(str_replace(
	array('{a1}', '{b1}', '{c1}', '{d1}'),
	array('a1', '', 'c', 'd1'),
	'{b1} <{c1}>'
));

Expected result:
----------------
<c>

Actual result:
--------------
nothing

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-06-07 05:47 UTC] EternalEssence at yandex dot ru
-Status: Open +Status: Closed
 [2012-06-07 05:47 UTC] EternalEssence at yandex dot ru
my mistake
 [2012-06-07 05:54 UTC] rasmus@php.net
-Status: Closed +Status: Not a bug
 [2012-06-07 05:54 UTC] rasmus@php.net
.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 08:01:30 2024 UTC