- mb_detect_encoding: documentation ( source)
- base64_decode: documentation ( source)
- mb_list_encodings: documentation ( source)
<?php
$test = base64_decode('Q0hBUlNFVD13aW5kb3dzLTEyNTI6RG/rO0pvaG4=');
echo mb_detect_encoding($test, mb_list_encodings());