Passing class names or objects?
- by nischayn22
I have a switch statement
switch ( $id ) {
case 'abc': return 'Animal';
case 'xyz': return 'Human';
//many more
}
I am returning class names,and use them to call some of their static functions using call_user_func().
Instead I can also create a object of that class, return that…