Hope this helps.
Integer literals
<?php
$a = 1234; // decimal number
$a = -123; // a negative number
$a = 0123; // octal number (equivalent to 83 decimal)
$a = 0x1A; // hexadecimal number (equivalent to 26 decimal)
?>
This is the answer
$hex = chr(0x5A);
echo "Hex explicit: \x5A, Hex evaluated:".$hex;
or
$hex = chr(0x5A);
echo "Hex explicit: \x5A, Hex evaluated: $hex";
Try this link http://www.w3schools.com/php/func_string_chr.asp