Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
/**
* Return a machine-usable name for a client
*
* This aims to be usable for unix group/user names and shells
*
* This is inspired from the context sanitization stuff.
*/
function hosting_client_sanitize($title) {
return strtolower(trim(preg_replace("/[!\W\.\-]/", "", $title)));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment