**Heads up!** To view this whole video, sign in with your Courses account or enroll in your free 7-day trial.
Sign In
Enroll

Start a free Courses trial

to watch this video

Integers are whole numbers, such as one through nine or negative one through negative nine. Any of these are considered integers because they aren't numbers that include decimal, or floating point, values. We'll be setting, retrieving, preforming operations and functions and displaying these values!

#### Documentation

Integers can be specified in decimal (base 10), hexadecimal (base 16), octal (base 8) or binary (base 2) notation, optionally preceded by a sign (- or +).

Example Integer literals:

```
$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)
```

var_dump() This function displays structured information about one or more expressions that includes its type and value. Arrays and objects are explored recursively with values indented to show structure.

gettype() Returns the type of the PHP variable var. For type checking, use is_* functions.

You need to sign up for Treehouse in order to download course files.

Sign up