change preg_replace/e to preg_replace_callback()