replace deprecated preg_replace /e with preg_replace_callback to pass php 5.6 travis tests