String Functions

PHP convert_uudecode() Function

Topic: PHP String ReferencePrev|Next


The convert_uudecode() function decodes a uuencoded string.

This function basically decodes a string encoded using convert_uuencode() function.

The following table summarizes the technical details of this function.

Return Value: Returns the decoded data as a string or false on failure.
Version: PHP 5+


The basic syntax of the convert_uudecode() function is given with:


The following example shows the convert_uudecode() function in action.

// Encoded string
$str = ",2&5L;&\@5V]R;&0A `";

// Decoding the string
echo convert_uudecode($str);


The convert_uudecode() function accepts the following parameter.

Parameter Description
string Required. Specifies the uuencoded string to decode.

More Examples

Here're some more examples showing how convert_uudecode() function actually works:

In the following example a string will be first uuencoded then decoded.

// Sample string
$str = "Alice in Wonderland";

// Uuencoding the string
$encoded_str = convert_uuencode($str);
echo $encoded_str . "<br>";

// Decoding the string
$decoded_str = convert_uudecode($encoded_str);
echo $decoded_str;
Bootstrap UI Design Templates