- preg_match: documentation ( source)
- var_export: documentation ( source)
- dechex: documentation ( source)
- ord: documentation ( source)
<?php
$string = 'a';
echo dechex(ord($string)) . "\n";
var_export(preg_match('/[\x80-\xFF]/', $string, $matches));
var_export($matches);