4 quizzes found.

How can you modify the copy of an object during a clone operation?

  1. Put the logic in the object's constructor to alter the values
  2. Implment your own function to do object copying
  3. Implement the object's __clone() method
  4. Implement __get() and __set() methods with the correct logic
  5. Implement the __copy() method with the correct logic

Choose 1 answers

What three special methods can be used to perform special logic in the event a particular accessed method or member variable is not found?

  1. __get($variable)
  2. __call($method, $params)
  3. __get($method)
  4. __set($variable, $value)
  5. __call($method)

Choose 3 answers

The _______ method will be called automatically when an object is represented as a string.

  1. getString()
  2. __get()
  3. __value()
  4. __toString()
  5. __getString()

Choose 1 answers

When an object is serialized, which method will be called, automatically, providing your object with an opportunity to close any resources or otherwise prepare to be serialized?

  1. __destroy()
  2. __serialize()
  3. __destruct()
  4. __shutdown()
  5. __sleep()

Choose 1 answers