base64_decode_toarray()
Decodes a base64 string to an array of long values.
Syntax
base64_decode_toarray(String)
Arguments
- String: Input string to be decoded from base64 to UTF8 string.
Returns
Returns an array of long values decoded from a base64 string.
- To decode base64 strings to a UTF-8 string, see base64_decode_tostring()
- To encode strings to a base64 string, see base64_encode_tostring()
Example
print Quine=base64_decode_toarray("S3VzdG8=")
// 'K', 'u', 's', 't', 'o'
| Quine |
|---|
| [75,117,115,116,111] |
If you try to decode a base64 string that was generated from an invalid UTF-8 encoding, "null" will be returned:
print Empty=base64_decode_toarray("U3RyaW5n0KHR0tGA0L7Rh9C60LA=")
| Empty |
|---|