1. Which of these statements is true about PHP 5?

    • a) Require and include are the same

    • b) Require includes files whether or not the line is executed

    • c) Require exits the script if it cannot find the file to include

    • d) None of the above

  2. Which of the following is not a valid way to start a PHP comment?

    • a) //

    • b) ##

    • c) /*

    • d) None of the above

  3. PEAR is...

    • a) A tasty fruit

    • b) The PHP Extended Assignment Repository

    • c) The PHP Extension and Application Repository

  4. Heredoc syntax is...

    • a) A way to define strings without worrying about quotation marks

    • b) A automatic documentation tool for PHP

    • c) The opposite of theredoc syntax

  5. Mixed-mode processing is...

    • a) The act of outputting HTML and pictures at the same time

    • b) The act of entering and exiting PHP processing mode several times

    • c) Impossible in PHP

  6. Using switch/case rather than multiple if statements is...

    • a) Faster

    • b) Easier to read

    • c) Both a) and b)

    • d) None of the above

  7. Escape sequences are the fastest way to exit your script: true or false?


Want to learn PHP 7?

Hacking with PHP has been fully updated for PHP 7, and is now available as a downloadable PDF. Get over 1200 pages of hands-on PHP learning today!

If this was helpful, please take a moment to tell others about Hacking with PHP by tweeting about it!

Next chapter: Further reading >>

Previous chapter: Summary

Jump to:


Home: Table of Contents

Copyright ©2015 Paul Hudson. Follow me: @twostraws.