Skip to content

Instantly share code, notes, and snippets.

@brunoleles
Last active April 8, 2017 17:07
Show Gist options
  • Save brunoleles/6de307cd239419ec7d43 to your computer and use it in GitHub Desktop.
Save brunoleles/6de307cd239419ec7d43 to your computer and use it in GitHub Desktop.
PHP : URL safe base64 functions

Snippet para "url safe" base64 functions

function base64_url_decode($input)
{
    return base64_decode(strtr($input, '-_,', '+/='));
}

function base64_url_encode($input)
{
    return strtr(base64_encode($input), '+/=', '-_,');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment