Miles' Blog

天涯何處無幹話,何必要講實務話

Types

變數的型態

Integer

整數,也就是 ℤ = {…, -2, -1, 0, 1, 2, …}。

Example for integer literals, see php.net:

$a = 1234; // decimal number
$a = -123; // a negative number
$a = 0123; // octal number (equivalent to 83 decimal)
$a = 0x1A; // hexadecimal number (equivalent to 26 decimal)
$a = 0b11111111; // binary number (equivalent to 255 decimal)
0%