- base64_decode: documentation ( source)
- base64_encode: documentation ( source)
<?php
$str = 'This is an encoded string';
echo base64_encode($str); // VGhpcyBpcyBhbiBlbmNvZGVkIHN0cmluZw==
$str = 'VGhpcyBpcyBhbiBlbmNvZGVkIHN0cmluZw==';
echo base64_decode($str);