PHP convert_uuencode() Function

Definition

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

Syntax

PHP convert_uuencode() Function has the following syntax.

convert_uuencode(string)

Parameter

ParameterIs RequiredDescription
stringRequired. The string to uuencode

Return

PHP convert_uuencode() Function returns the uuencoded data.

Example

Encode a string:


<?php
$str = "Hello world from java2s.com!";
echo convert_uuencode($str);
?>

The code above generates the following result.

Example 2

Encode a string and then decode it:


<?php// w w  w .j a v  a 2s  . c  om
$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.





















Home »
  PHP Tutorial »
    Function reference »




PHP Array Functions
PHP Calendar Functions
PHP Class Functions
PHP Data Type Functions
PHP Date Functions
PHP File Functions
PHP Image Functions
PHP Math Functions
PHP MySQLi Functions
PHP SimpleXML Functions
PHP String Functions
PHP XML Functions
PHP Zip Functions