Example
Decode uuencode-encoded string:
<?php $str = ",2&5L;&@=V]R;&0A `"; echo convert_uudecode($str);?>
Definition and usage
convert_uudecode() function decodes uuencode-encoded characters The string is decoded.
This function is usually used together with the convert_uuencode() function.
Syntax
convert_uudecode(string)
Parameters DDescription
string Specifies the uuencoded string to be decoded.
Technical details
Return value: Return the decoded data in string form.
PHP Version: 5+
More Examples
Encode a string and then decode it:
<?php $str = "Hello world!"; // Encode the string $encodeString = convert_uuencode($str); echo $encodeString . "<br>"; // Decode the string $decodeString = convert_uudecode($encodeString); echo $decodeString; ?>
convert_uudecode Example
XML file:
<?xml version="1.0" encoding="ISO-8859-1"?> <note xmlns:b="http://www.w3school.com.cn/example/"> <to>George</to> <from>John</from> <heading>Reminder</heading> <b:body>Don't forget the meeting!</b:body> </note>
PHP code:
<?php if (file_exists('test.xml')) { $xml = simplexml_load_file('test.xml'); } print_r($xml->getDocNamespaces()); ?>
Output similar to:
Array ( [b] => http://www.w3school.com.cn/example/ )
The above is the detailed content of PHP implements the function convert_uudecode() that decodes uuencoded strings. For more information, please follow other related articles on the PHP Chinese website!