PHP convert_uudecode() Function
In this chapter you will learn:
- Definition for PHP convert_uudecode() Function
- Syntax for PHP convert_uudecode() Function
- Parameter for PHP convert_uudecode() Function
- Return for PHP convert_uudecode() Function
- Example - Encode a string and then decode it
Definition
The convert_uudecode() function decodes a uuencoded string.
This function is often used together with the convert_uuencode() function.
Syntax
PHP convert_uudecode() Function has the following syntax.
convert_uudecode(string)
Parameter
Parameter | Is Required | Description |
---|---|---|
string | Required. | The uuencoded string to decode |
Return
PHP convert_uudecode() Function returns the decoded data as a string.
Example
Encode a string and then decode it:
<?php//from j av a 2s . 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.
Next chapter...
What you will learn in the next chapter:
- Definition for PHP convert_uuencode() Function
- Syntax for PHP convert_uuencode() Function
- Parameter for PHP convert_uuencode() Function
- Return for PHP convert_uuencode() Function
- Example - Encode a string
- Example - Encode a string and then decode it
Home » PHP Tutorial » PHP String Functions