Comprehension Check CH2.docx

Comprehension Check CH2.docx - Comprehension Check Chapter...

Info icon This preview shows pages 1–3. Sign up to view the full content.

Comprehension Check Chapter 2 1. A(n) allows you to treat a related group of PHP commands as a single unit. c. function 2. Functions must contain parameters. True 3. Explain how to use a return statement to return a value to a statement that calls a function. To actually return a value to a $ReturnValue variable, the code must include a return statement within the averageNumbers() function. 4. A variable that is declared outside a function is called a variable. d. global 5. A local variable must be declared . c. within the braces of a function definition 6. Explain the difference between passing a parameter to a function by value versus by reference. 7. Which of the following is the correct syntax for an if statement? c. if ($MyVariable == 10) echo "Your variable is equal to 10."; 8. An if statement can include multiple statements provided that they . d. are contained within a command block 9. Which is the correct syntax for an else clause?
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

b. else echo "Displayed from an else clause."; 10. Th e switch statement controls program flow by executing a specific set of statements, depending on
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.
  • Winter '15
  • johnston
  • PHP, Control flow, Correct syntax, Web Systems, Comprehensive Check

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern