convert_uuencode – PHP Functions


string convert_uuencode(string) ;

Description :

convert_uuencode() function will encodes a string using the uuencode algorithm.

Note : Uuencode translates all strings (including binary’s ones) into printable characters, making them safe for network transmissions.
Note : Uuencoded data is about 35% larger than the original.

Parameter :

  • string –  String to be encoded.

Output :

This will return the encoded string using the uuencode algorithm or FALSE on failure.

Related articles : convert_uudecode().

convert_uuencode() – PHP Functions Example 1 :

$strExample = convert_uuencode("Hi from!");
echo $strExample;

In above example ,We have a string “Hi from!”. So, when we apply convert_uuencode() function. This will return below values.

Now Output will become –


convert_uuencode() with convert_uudecode()  – PHP Functions Example 2 :

/**Encode the string**/
$strExample = convert_uuencode("Hi from!");
echo $strExample;
echo "<br><br>";

/**Decode the above string back to its original value**/
$strExample1 = convert_uudecode($strExample);
echo $strExample1;

In above example ,We have a string “Hi from!”. So, when we apply convert_uuencode() and convert_uudecode() function, We will get the original value.

Output will be like below:

Hi from!

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *