private function charCodeAt($str, $index)
    {
        $char = mb_substr($str, $index, 1, 'UTF-8');
        if (mb_check_encoding($char, 'UTF-8')) {
            $ret = mb_convert_encoding($char, 'UTF-32BE', 'UTF-8');
            $result = hexdec(bin2hex($ret));

            return $result;
        }

        return;
    }
private function charCodeAt($str, $index)
    {
        $char = mb_substr($str, $index, 1, 'UTF-8');
        if (mb_check_encoding($char, 'UTF-8')) {
            $ret = mb_convert_encoding($char, 'UTF-32BE', 'UTF-8');
            $result = hexdec(bin2hex($ret));

            return $result;
        }

        return;
    }
private function charCodeAt ( $ str , $ index ) { $ char = mb_substr ( $ str , $ index , 1 , 'UTF-8' ) ; if ( mb_check_encoding ( $ char , 'UTF-8' ) ) { $ ret = mb_convert_encoding ( $ char , 'UTF-32BE' , 'UTF-8' ) ; $ result = hexdec ( bin2hex ( $ ret ) ) ; return $ result ; } return ; }
Get the Unicode of the character at the specified index in a string.

@param string $str
@param int    $index

@return null|number
Get the Unicode of the character at the specified index in a string .