Test Your Knowledge
What tag is used to cause PHP to start interpreting program code? And what is the short form of the tag?
What are the two types of comment tags?
Which character must be placed at the end of every PHP statement?
Which symbol is used to preface all PHP variable names?
What can a variable store?
What is the difference between
$variable = 1and$variable == 1?Why do you suppose that an underscore is allowed in variable names (
$current_user), whereas hyphens are not ($current-user)?Are variable names case-sensitive?
Can you use spaces in variable names?
How do you convert one variable type to another (say, a string to a number)?
What is the difference between
++$jand$j++?Are the operators
&&andandinterchangeable?How can you create a multiline
echoor assignment?Can you redefine a constant?
How do you escape a quotation mark?
What is the difference between the
echoandprintcommands?What is the purpose of functions?
How can you make a variable accessible to all parts of a PHP program?
If you generate data within a function, what are a couple of ways to convey the data to the rest of the program?
What is the result of combining a string with a number?
See Chapter 3 Answers in Appendix A for the answers to these questions.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access