base64_decode

Decodes data encoded with MIME base64

&reftitle.description; `string` `base64_decode` `string` `data` `bool` `strict` false

Decodes a base64 encoded `data`.

&reftitle.parameters;

`data`

- The encoded data.

`strict`

- Returns &false; if input contains character from outside the base64 alphabet.

&reftitle.returnvalues;

Returns the original data&return.falseforfailure;. The returned data may be binary.

&reftitle.changelog;

&Version; | &Description;
5.2.0 | `strict` added

&reftitle.examples;

### `base64_decode` example

    <?php
    $str = 'VGhpcyBpcyBhbiBlbmNvZGVkIHN0cmluZw==';
    echo base64_decode($str);
    ?>

&example.outputs;

    This is an encoded string

&reftitle.seealso;

- `base64_encode`
- RFC 2045 section 6.8