replace deprecated preg_replace(//e) with preg_replace_callback