Do I need still to be concerned about favouring str_replace over preg_replace in PHP 7? I have the following piece of code:

$Page = str_replace('-&amp;amp;-', '-[+]-', $Page);
$Page = str_replace('&amp;amp;', '-[+]-', $Page);
$Page = str_replace('-and-', '-[+]-', $Page);
$Page = str_replace('-et-', '-[+]-', $Page);
$Page = str_replace('-und-', '-[+]-', $Page);
$Page = str_replace('-y-', '-[+]-', $Page);
$Page = str_replace('-&amp;-', '-[+]-', $Page);


which I then run many times per page load (perhaps 10 to 40 times).


  N.B. $Page represents a URL fragment - rarely more than 20 characters long.


Am I better off leaving it as it is, or may I, for the purposes of code maintenance, rewrite this code as:

$Page = preg_replace('/(-&amp;-|-&amp;amp;-|&amp;amp;|-and-|-et-|-und-|-y-)/', '-[+]-', $Page);


without suffering a slowdown of one or several hundredths of a second?

(If the slowdown is a matter of milliseconds, I am less bothered).



Background:

I am less familiar with the evolution of PHP than with that of javascript, css etc. so when I see recommendations (long-stated, albeit from the late 2000s and early 2010s) like:


  Avoid preg_replace unless you need to use it and always use
  str_replace instead, which is an order of magnitude faster.


I don't know if that recommendation still has any relevancy for PHP 7.3 in 2020, or whether that recommendation was important to follow in the days of PHP 5, but is less of a concern now (given that PHP 7 is so much faster and more optimised than its predecessor).
Most of such advises are crystal clear bullshit, on so many levels. You need to understand that such recommendations are never a result of some quality research, but just a rephrase of some vague rumor. The internet is full of chimpanzees. 

This particular advise didn't make any sense even for PHP5.

That said, a set of consequent function calls apparently should be less efficient than a single call (but again if only it made any real life difference whatsoever). 

That said, str_replace accepts array arguments, so it can be 

$Page = str_replace(['-&amp;-','-&amp;amp;-','&amp;amp;','-and-','-et-','-und-','-y-'], '-[+]-', $Page);


But you can use whatever version you like, as any difference is unnoticeable. Personally I find preg_replace() approach the cleanest and would prefer that. 

As a rule of thumb, do not trust some random pieces of advise from Internet, especially performance-related. It's always just random rubbish. Bother with any optimizations only if your code actually has performance issues. And even in this case do not optimize random irrelevant parts but find the actual bottleneck and optimize it.