use preg_replace_callback() instead of preg_replace() with deprecated /e modifier