PHP convert_uuencode() Function
PHP convert_uuencode() function is predefined string function, which is used to encodes a string using the uuencode algorithm. It returns the uuencoded data.
Syntax:
convert_uuencode(string)
Parameter | Description | Required/Optional |
---|---|---|
string | The string to uuencode | Required |
Example 1
<?php
// encode the string
$str2 = "I love My India";
echo "Your Decoded string is :".$str2;
$uuencodeString = "<br>"."By using 'convert_uuencode()' function your encoded string is : ". convert_uuencode($str2);
echo $uuencodeString . "<br>" ;
?>
Output
Your Decoded string is :I love My India
By using 'convert_uuencode()' function your encoded string is : /22!L;W9E($UY($EN9&EA `
Example 2
<?php
// encode the string
$str2 = "I love PHP!";
echo "Your Decoded string is :".$str2;
$uuencodeString ="<br>" ."By using 'convert_uuencode()' function your encoded string is : ". convert_uuencode($str2);
echo $uuencodeString . "<br>" ."<br>"
// Decode the string
$str1 =("+22!L;W9E(%!(4"$`n`");
echo "Your Encoded string is :".$str1;
$EncodedString ="<br>" ."By using 'convert_uudecode()' function your encoded string is : ". convert_uudecode($str1);
echo $EncodedString . "<br>" ."<br>" ;
echo "Your string is: ".$str. "<br>"
echo "By using 'chunk_split()' function your string is: ".chunk_split($str,1,".");
?>
Output
Your Decoded string is :I love PHP!
By using 'convert_uuencode()' function your encoded string is : +22!L;W9E(%!(4"$` `
Your Encoded string is :+22!L;W9E(%!(4"$` `
By using 'convert_uudecode()' function your encoded string is : I love PHP!