- var_dump: documentation ( source)
- bin2hex: documentation ( source)
- mb_detect_encoding: documentation ( source)
<?php
$s = 'Tglich montags bis freitags';
$s = iconv('UTF-8', 'ISO-8859-1', $s);
$encoding = mb_detect_encoding($s, 'UTF-8', true);
$hex = bin2hex($s);
var_dump($encoding);
var_dump($hex);