<?php
class Test{ const AB♥ = "alphabet"; }
$rc = new ReflectionClass("Test");
$t = array_keys( $rc->getConstants())[0];
if ( mb_substr($t,-1,1,"utf-8") == "\xe2\x99\xa5" ) {
var_dump($t,mb_substr($t,-1,1,"utf-8"), "\xe2\x99\xa5");
echo "heart: ",json_decode('"' . "\u2665" . '"');
//trigger_error("heart symbol is disallowed",E_USER_ERROR);
}
preferences:
45.64 ms | 402 KiB | 5 Q