convert_uuencode()
convert_uuencode() — Uuencode a string.
Built-in function of PHP 8.5. The manual lists it as available in PHP 5, PHP 7, PHP 8. This page is the reference card: signature, parameters and return value, plus the changelog and the example the manual provides.
What it does
convert_uuencode() encodes a string using the uuencode algorithm.
Signature
convert_uuencode(string $string): string
Parameters
| Parameter | Type | What it takes |
|---|---|---|
| $string | string | The data to be encoded. |
Return value
Returns the uuencoded data.
Example
A runnable snippet:
$some_string = "test\ntext text\r\n"; echo convert_uuencode($some_string);
Output:
0=&5S=`IT97AT('1E>'0-"@`` `
Changelog
| Version | Change |
|---|---|
| 8.0.0 | Prior to this version, trying to convert an empty string returned false for no particular reason. |
See also
convert_uudecode(), base64_encode()
All PHP 8.5 built-in functions
Reference card built from the PHP manual page convert_uuencode() (PHP documentation, CC BY 3.0). The page is generated from the manual, so the wording of the parameter and return value text follows php.net.