- 4.1 Data Types
- 4.2 Variables
- 4.3 Constants
- 4.4 Chapter Summary
- Chapter 4 Lab
4.4 Chapter Summary
4.4.1 What You Should Know
Now that you have finished this chapter you should be able to answer the following questions:
-
What are the PHP basic data types?
-
What is the gettype() function?
-
What is the difference between a scalar and a composite data type?
-
What is the difference between a variable and a constant?
-
When do you need double quotes? Single quotes?
-
How can you see a backslash interpreted in the browser?
-
How do you concatenate two strings?
-
Why would you use a here-doc?
-
What data type is represented by true or false? Are true and false case sensitive?
-
What is NULL?
-
Is "$_over-out" a valid variable name? Why or why not?
-
Is it mandatory to initialize a variable?
-
What function can you use to tell if a variable exists?
-
How do you get rid of a variable?
-
What is meant by scope?
-
What is the function of the register_globals directive? In what file is it located? Is it on or off in your version of PHP?
-
What are form variables?
-
What is the difference between the GET and POST methods?
-
What is the value of $_REQUEST?
-
How do you create a constant?
-
Why are constants useful?
-
What is a "magic constant"?
4.4.2 What's Next?
Another important chapter basic to all programming languages, Chapter 5, "Operators," covers PHP's rich set of operators and how to use them to manipulate data; for example, how to perform arithmetic on numbers, compare strings and numbers, test equality, combine expressions, and test them with logical operators, bitwise operations, and more.