十进制到十六进制字符串

I have a decimal value of a utf-32 character:

$a=21644;

How can I convert this using php to a string of the hex? '548c'

Here is the page for the codes I am using: http://www.fileformat.info/info/unicode/char/548c/index.htm

dechex is what you need here:

php > echo dechex(21644);
548c

You'll want to use dechex:

$hex = dechex($decimal);

Read more here