← All built-ins / ord()
ord()
ord(string $s): int
Parameters
| Name | Type | Description |
|---|---|---|
| $s | string | string; only the first byte is used |
Return value
Byte value (0–255) of the first character.
Example
echo ord("A"), "
";
echo ord("a"), "
";65 97