View the Complete Blog on ZCE
What is the best way to ensure that a user-defined function is always passed an object as its single parameter?
1.
What is the best way to ensure that a user-defined function is always passed an object as its single parameter?
2. function myfunciton($a = stdClass)
3. Use is_object() within the function
4. There is no way to ensure the parameter will be an object
5. function myfunction(Object $a)
Answer: 1.
No comments:
Post a Comment