mb-ord
mb_ord
Get Unicode code point of character
ENTITY
int
false
mb_ord
string
string
string
null
encoding
ENTITY
Returns the Unicode code point value of the given character.
This function complements mb_chr.
ENTITY
string
A string
encoding
ENTITY
ENTITY
The Unicode code point for the first character of string ENTITY.
ENTITY ENTITY
ENTITY
| ENTITY | ENTITY |
|---|
ENTITY
A basic mb_ord example
<?php
var_dump(mb_ord("A", "UTF-8"));
var_dump(mb_ord("🐘", "UTF-8"));
var_dump(mb_ord("\x80", "ISO-8859-1"));
var_dump(mb_ord("\x80", "Windows-1252"));
?>
ENTITY
int(65)
int(128024)
int(128)
int(8364)
ENTITY
mb_internal_encoding, mb_chr, IntlChar::ord, ord
这篇文档对你有帮助吗?
谢谢你的反馈!