base64_decode

string base64_decode(string encoded_data) 

Decodes a string encoded with base64 encoding.

Returns:

Decoded string; FALSE if the argument passed has no length when converted to a string

Description:

base64_decode() decodes a base64 string and returns the decoded data. The data returned may be character or binary data.

Note:

Base64 encoding is used to encode data before it’s transferred across legacy email systems that only support 7-bit ASCII. For more information on base64, refer to RFC 2045.

Availability:

UNIX, Windows

Version:

3+, 4+

See also:

base64_decode() 

Example:

Demonstrate how base64_decode() works
 $data = "Hey Jude"; $encoded = base64_encode ($data); $decoded = base64_decode ($encoded); print <<<_END_ Original Data: ...

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.