https://bugzilla.wikimedia.org/show_bug.cgi?id=26605
Summary: Use strtr instead of str_replace when possible
Product: MediaWiki
Version: unspecified
Platform: All
URL: http://php.net/manual/en/function.strtr.php
OS/Version: All
Status: NEW
Severity: enhancement
Priority: Normal
Component: General/Unknown
AssignedTo: [email protected]
ReportedBy: [email protected]
Blocks: 700
The PHP function strtr is like 4 times faster than str_replace and would be
pretty useful to use in MediaWiki in many places.
In the source code, I've noticed many replacements of underscores to spaces and
vice versa, often in the form str_replace("_", " ", $foo), whereas strtr($foo,
"_", " ") is much faster.
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l