“However, preg_replace has a hidden tricky option where if you pass the /e modifier it will execute the content, instead of just replacing.”

@williballenthin