src/Rehyved/Utilities/Base64Url.php
public static function encode($arg)
    {
        $s = base64_encode($arg); // Standard base64 encoder

        $s = explode('=', $s)[0]; // Remove any trailing '='s
        $s = str_replace('+', '-', $s); // 62nd char of encoding
        $s = str_replace('/', '_', $s); //63rd char of encoding

        return $s;
    }
public static function encode($arg)
    {
        $s = base64_encode($arg); // Standard base64 encoder

        $s = explode('=', $s)[0]; // Remove any trailing '='s
        $s = str_replace('+', '-', $s); // 62nd char of encoding
        $s = str_replace('/', '_', $s); //63rd char of encoding

        return $s;
    }
public static function encode ( $ arg ) { $ s = base64_encode ( $ arg ) ; // Standard base64 encoder $ s = explode ( '=' , $ s ) [ 0 ] ; // Remove any trailing '='s $ s = str_replace ( '+' , '-' , $ s ) ; // 62nd char of encoding $ s = str_replace ( '/' , '_' , $ s ) ; //63rd char of encoding return $ s ; }
Encodes the specified byte array.
@param $arg
@return mixed|string
Encodes the specified byte array .