Bug #62248 [Csd->Nab]: str_replace() with multiple replacing

From: Date: Thu, 07 Jun 2012 05:54:24 +0000
Subject: Bug #62248 [Csd->Nab]: str_replace() with multiple replacing
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-171089@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=62248&edit=1 ID: 62248 Updated by: rasmus@php.net Reported by: EternalEssence at yandex dot ru Summary: str_replace() with multiple replacing -Status: Closed +Status: Not a bug Type: Bug Package: Strings related Operating System: Windows 7 / Debian / etc? PHP Version: 5.3.13 Block user comment: N Private report: N New Comment: . Previous Comments: ------------------------------------------------------------------------ [2012-06-07 05:47:54] EternalEssence at yandex dot ru my mistake ------------------------------------------------------------------------ [2012-06-07 05:33:37] 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 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=62248&edit=1

« previous php.bugs (#171089) next »