switch to using `preg_replace_callback` everywhere in place of `/e`.
this fixes deprecation warnings in PHP 5.5