User Tools

Site Tools


eg-259:review:php2

Review Questions

Adapted from: Robert W. Sebasta, Programming the World-Wide Web, 3rd Edition, Addison Wesley, 2006. Supporting: Contact Hour 20.

  1. In what two ways can arrays in PHP be created?
  2. What keys are used when an array is created but no keys are specified?
  3. Must all of the values of an array be of the same type?
  4. Must all of the keys of an array be of the same type?
  5. What exactly do the array_keys and array_values functions do?
  6. What exactly does the in_array function do?
  7. Explain the actions of the implode and explode functions.
  8. Describe the actions of the next, reset, and prev functions.
  9. What are the syntax and semantics of the two forms of the foreach statement?
  10. Describe the result of using the sort function on an array that has both string and numeric values.
  11. What is the difference between the sort and asort functions?
  12. What happens if a script defines the same function more than once?
  13. Are function names case sensitive?
  14. What value is returned by a function if its execution does not end by executing a return statement?
  15. What are the two ways you can specify that a parameter is to be passed by reference?
  16. How can a variable used outside a function be accessed by the function?

More Review Questions

eg-259/review/php2.txt · Last modified: 2012/03/13 20:24 by eechris