It’s with the addition of code. I can take my entire code snippet with pregReplace [my function] and then just replace for preg_replace [php function] and hit save and it’ll go to the 404 page upon hitting save.
I have tried everything and continue to have the error with preg_replace(). I can’t attribute it to anything and it’s a really weird bug. I ended up just making my own function pregReplace() and then using that function in functions.php to get around it. I wish I could provide more details, but frankly – as a developer as well – I’m baffled what would be causing it.