Transform the name of a PHP construct (function, variable etc) to one in snake_case.

@since 2.0.0 Moved from the `WordPress.NamingConventions.ValidFunctionName` sniff
to this class, renamed from `get_name_suggestion` and made static
so it can also be used by classes which don't extend this class.

@param string $name The construct name.

@return string