Current Location: Home> Function Categories> convert_uuencode

convert_uuencode

Use uuencode to encode a string
Name:convert_uuencode
Category:String
Programming Language:php
One-line Description:Encode strings using the uuencode algorithm.

Definition and usage

convert_uuencode() function uses the uuencode algorithm to encode strings.

Note: This function encodes all strings (including binary) into printable characters to ensure the security of their database storage and network transmission data. Remember, before reusing the data, use convert_uudecode() function.

Note: The uuencoded data is approximately 35% larger than the original data.

Example

Example 1

Encoded string:

 <?php
$str = "Hello world!" ;
echo convert_uuencode ( $str ) ;
?>

Try it yourself

Example 2

Encode the string and decode it:

 <?php
$str = "Shanghai" ;
// Encode strings
$encodeString = convert_uuencode ( $str ) ;
echo $encodeString . "<br>" ;

// Decode the string
$decodeString = convert_uudecode ( $encodeString ) ;
echo $decodeString ;
?>

Try it yourself

grammar

 convert_uuencode ( string )
parameter describe
string Required. Specifies the string to be encoded.
Similar Functions
Popular Articles