← All built-ins / bin2hex()
bin2hex()
bin2hex(string $s): string
Parameters
| Name | Type | Description |
|---|---|---|
| $s | string | raw bytes |
Return value
Hex string, two characters per byte.
Example
echo bin2hex("AB");4142
| Name | Type | Description |
|---|---|---|
| $s | string | raw bytes |
Hex string, two characters per byte.
echo bin2hex("AB");4142