|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-07-16 14:21 UTC] giorgio dot liscio at email dot it
[2010-07-16 14:31 UTC] emiobe at guehring dot de
[2010-07-19 11:45 UTC] aharvey@php.net
-Status: Open
+Status: Wont fix
[2010-07-19 11:45 UTC] aharvey@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Mon Jan 05 02:00:02 2026 UTC |
Description: ------------ Currently I can search case-insensitive with str_ireplace. But when I need the original string in the replacement I have to use preg_replace//i. It would be nice to have the original text in a "magic variable" like $1 to avoid using the "expensive" preg-engine. Test script: --------------- currently: print str_ireplace ("original", "<b>original</b>", "the ORIGINAL text"); idea: print str_ireplace ("original", "<b>$1</b>", "the ORIGINAL text"); Expected result: ---------------- the <b>original</b> text Actual result: -------------- the <b>ORIGINAL</b> text