Encode. The ASCII block includes length markers and newlines.
Measure output. Length becomes 12 for this sample.
Trade-off. Text-safe transport costs extra size (Base64 also expands, but is preferred for new work).
Frequently Asked Questions
convert_uuencode() encodes a string using the uuencode algorithm, converting binary or text data into printable ASCII characters safe for text-only channels like old email systems.
string convert_uuencode(string $string). You pass the raw data and receive a uuencoded string. The original string is not modified.
Both turn binary into text, but uuencode is a legacy Unix format. Base64 is the modern standard—more compact and widely used in web APIs and email today.
No. PHP encodes the data block only—it does not add the begin or end wrapper lines found in standalone uuencode files on disk.
Use it when maintaining legacy systems, reproducing old uuencode output, or learning historical encoding. For new PHP projects, prefer base64_encode() and base64_decode().