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 

E function myfunction(Object $a) 

+ Answer
+ Report
Total Preview: 1580

Copyright © 2024. Powered by Intellect Software Ltd