1. To delete a variable, what function do you use:

    • a) delete()

    • b) unset()

    • c) deset()

    • d) remove()

  2. To uppercase the first letter in a string, what function do you use:

    • a) str_to_upper()

    • b) str_to_upper_first()

    • c) uc_first()

    • d) ucfirst()

  3. What does the dl() function do, and what is the major disadvantage to using it?

  4. Which of the following statements are true about recursive functions:

    • a) They call themselves

    • b) They need to be inside loops

    • c) They need to be registered with PHP

    • d) They must return a value

  5. Regular expressions should be used whenever possible : true or false?

  6. You always need to use addslashes() on variables before inserting them into a database: true or false?

  7. Using register_shutdown_function(), you can register as many shutdown functions as you want: 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.