int ord
stringの先頭文字の ASCII 値を返します。 この関数は chr と逆の動作をします。
例 1. ord の例
if (ord($str) == 10) { echo("\$str の先頭は改行文字です。\n"); }
chr も参照下さい。