ord(string)
For instance:
echo ord("A")." - A\n"; // outputs: 65
echo ord("a")." - a\n"; // outputs: 97
echo ord("z")." - z\n"; // outputs: 122
echo ord(7)." - 7\n"; // outputs: 55
echo ord("7")." - '7'\n"; // outputs: 55