$ch = 'y';
$ascii_value = ord($ch); // Get the ASCII value of the character
$hex_value = dechex($ascii_value); // Convert the ASCII value to hexadecimal
echo "The hexadecimal value of '$ch' is 0x$hex_value";
/*
run:
The hexadecimal value of 'y' is 0x79
*/