Replace PCRE /e modifier with preg_replace_callback() - PHP 5.5

Replaced usage of preg_replace with "/e" modifier with
  preg_replace_callback() using a closure