$switch_str = array(
"other" => "thing",
"thing" => "other"
);
$switch_preg = array(
"/\bother\b/i" => "thing",
"/\bthing\b/i" => "other"
);
$input = "Another other thing"; // the needed output is "Another thing other"
echo preg_replace(array_keys($switch_preg), array_values($switch_preg), $input); // Another other other (due to a re-switch)
echo "<br>";
echo strtr($input, $switch_str); // Anthing thing other ("anthing" is the result of using no regex)
Simultaneous means replacing more than one thing at the same time. You can call it parallel replacing too. Some quotes that may help:
if you are using the preg_replace with arrays, the replacements will apply as subject for the patterns later in the array. This means replaced values can be replaced again.
if you go straight and substitute all 'A's wit 'T's you can't tell for sure which 'T's to substitute with 'A's afterwards.
In other words, the array is just a shortcut to run multiple preg_replace. It doesn't act like strtr, which doesn't re-replace what was already replaced:
strtr() will always look for the longest possible match first and will *NOT* try to replace stuff that it has already worked on,