first move from preg_replace /e to preg_replace_callback

From http://www.php.net/manual/en/reference.pcre.pattern.modifiers.php

    Use of this modifier is discouraged, as it can easily introduce security vulnerabilites: "

and 

    This feature has been DEPRECATED as of PHP 5.5.0. Relying on this feature is highly discouraged.

This first change, remove 1 usage of /e modifier and use preg_replace_callback (available in all PHP versions)

If you agree on this change, I will work on the other use of the /e