Latest web development tutorials

PHP convert_uuencode () function

PHP String Reference PHP String Reference

Examples

Encoded string:

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

Running instance »

Definition and Usage

convert_uuencode () function uses the uuencode algorithm to encode strings.

Note: This function takes all strings (including binary) encoded as printable characters to ensure the security of its database storage and network transmission.Remember, before re-use data, use convert_uudecode () function.

Note: uuencoded data increased about 35% than the original data.


grammar

convert_uuencode( string )

参数 描述
string 必需。规定要进行 uuencode 编码的字符串。

technical details

return value: Back uuencoded coded data.
PHP version: 5+


More examples

Example 1

Encoded 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;
?>

Running instance »


PHP String Reference PHP String Reference