PHP - Hexadecimal literal
Hexadecimal integer constant, also known as base 16 constant. it is from combination of following hexadecimal digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a/A, b/B, c/C, d/D, e/E, f/Fhexadecimal literal
Description
0xA12F
Output
- return - Integers
Examples
PHP
Hexadecimal literal the possible of use:$x = 0x1234; // x = 4660
$y = 4 * 0xff; // y = 1020
if ($x>0xabc)
$y = (double)$x / 0xa; // y = 466
PHP
Other pieces of example codes:(double)$x / 0xa
$i * 0xFF
0xf << 5
0xa | 5
0xAF
0xff | $k
You can find it in the following collections: constants
Hexadecimal literal in another programming language:
Differences to: