parseHeader(), improved format of preg_replace_callback, more readable