- var_dump: documentation ( source)
- strpos: documentation ( source)
- chr: documentation ( source)
- mb_substr: documentation ( source)
- array_keys: documentation ( source)
- trigger_error: documentation ( source)
<?php
class Test{ const AB♥ = "alphabet"; }
$rc = new ReflectionClass("Test");
//$bad = "♥";
$bad = chr(e2);
$key = array_keys( $rc->getConstants() );
$target = $key[ 0 ];
$pos = strpos( $target, $bad );
var_dump( $pos,mb_substr( $target, $pos,1 )); // 5.6
if ($pos !== FALSE) {
trigger_error( "'$bad' in '$target'" );
}