- base64_decode: documentation ( source)
- htmlspecialchars: documentation ( source)
- base64_encode: documentation ( source)
- html_entity_decode: documentation ( source)
<?php
$xxx = 'R3V2ZiBmdmdyIHVuZiBhYmcgYm9nbnZhcnEgbiB5dnByYWZyIHNlYnogPG4gdWVycz0idWdnYzovL3B2Z2VuLmpyby52cSI+UHZnZW5qcm88L24+';
$xxx = base64_decode($xxx);
$string = 'VGhpcyBzaXRlIGhhcyBub3Qgb2J0YWluZWQgYSBsaWNlbnNlIGZyb20gJmx0O2EgaHJlZj0mcXVvdDtodHRwOi8vY2l0cmEud2ViLmlkJnF1b3Q7Jmd0O0NpdHJhd2ViJmx0Oy9hJmd0Ow==';
$encoded = htmlspecialchars($string);
$encoded64 = base64_encode($encoded);
$decoded64 = html_entity_decode(base64_decode($string));
echo $decoded64;