<<< Previous question <<< Question ID#0594.md >>> Next question >>>
What is the best way to ensure that a user-defined function is always passed an object as its single parameter?
- A) function myfunction(stdClass $a)
- B) function myfunciton($a = stdClass)
- C) Use is_object() within the function
- D) There is no way to ensure the parameter will be an object
Answer
Answer: A