Replace deprecated usage of \e in preg_replace

Replaces `preg_replace()` with the `\e` modifier with `preg_replace_callback()`, at least where deprecation warnings have been spotted during testing.

Also removes the suppression of PHP errors from causing hard test failures.