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

- 2x 2x
- 1.75x 1.75x
- 1.5x 1.5x
- 1.25x 1.25x
- 1.1x 1.1x
- 1x 1x
- 0.75x 0.75x
- 0.5x 0.5x
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.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up-
bilal agha
PHP Development Techdegree Student 4,509 Points1 Answer
-
Kevin Karkhiran
363 Points1 Answer
-
Siraj Khan
3,451 PointsI have tried to make index.php and numbers.php files in my editor ATOM. I cannot see my results in the console.?
Posted by Siraj KhanSiraj Khan
3,451 Points2 Answers
-
Lindsay Wilson
11,223 Points2 Answers
-
Cliff Jackson
2,887 PointsNumber is displaying in the wrong place in the console
Posted by Cliff JacksonCliff Jackson
2,887 Points2 Answers
-
PLUS
William Bentley
Courses Plus Student 6,601 Points1 Answer
-
Faye Ma
1,028 PointsI've been following along but the console never print the result
Posted by Faye MaFaye Ma
1,028 Points2 Answers
-
Boris Voinov
305 Points4 Answers
-
Ryan Sprouse
3,291 PointsI have been following along with the php basics videos and when I run the php in workspace it doesn't run.
Posted by Ryan SprouseRyan Sprouse
3,291 Points2 Answers
-
György Varga
19,198 Points1 Answer
-
Tomas Svojanovsky
26,680 Points1 Answer
-
Sufiyaan Haroon
Full Stack JavaScript Techdegree Student 9,558 Points2 Answers
-
Kumbirai Ruth Huni
4,209 Points3 Answers
-
Geet Aneja
2,091 Points3 Answers
-
sapna rathore
468 Points4 Answers
-
A X
12,842 Points2 Answers
View all discussions for this video
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up