WordPress Version: 6.1
/**
* Strips close comment and close php tags from file headers used by WP.
*
* @since 2.8.0
* @access private
*
* @see https://core.trac.wordpress.org/ticket/8497
*
* @param string $str Header comment to clean up.
* @return string
*/
function _cleanup_header_comment($str)
{
return trim(preg_replace('/\s*(?:\*\/|\?>).*/', '', $str));
}