PHP Tip #6: str_replace Is Faster

/ PHP / by Paul Robinson / 1 Comment

This is probably a very well known tip, but for those new to PHP it’s handy. When needing to replace something try & use str_replace instead of preg_replace. Always remember that REGEX is costly & should only be used when it is really needed. If you need to do a case insensitive replace then use str_ireplace.

Read more

I'll keep your WordPress site up-to-date and working to its best.

Find out more