The convert_uudecode() function decodes a uuencoded string.
This function is often used together with the convert_uuencode() function.
PHP convert_uudecode() Function has the following syntax.
convert_uudecode(string)
Parameter | Is Required | Description |
---|---|---|
string | Required. | The uuencoded string to decode |
PHP convert_uudecode() Function returns the decoded data as a string.
Encode a string and then decode it:
<?php//ww w . j a v a2 s .c o m
$str = "Hello world from java2s.com !";
// Encode the string
$encodeString = convert_uuencode($str);
echo $encodeString . "\n";
// Decode the string
$decodeString = convert_uudecode($encodeString);
echo $decodeString;
?>
The code above generates the following result.