Integers

Integers can be specified using any of the following syntaxes:


$a = 1234; # decimal number
$a = -123; # a negative number
$a = 0123; # octal number (equivalent to 83 decimal)
$a = 0x12; # hexadecimal number (equivalent to 18 decimal)
     

The size of an integer is platform-dependent, although a maximum value of about 2 billion is the usual value (that's 32 bits signed).