What is the best practice regarding passing data to functions - variables, or arrays(objects).
For example, I need user info for most functions. Should I pass full user
There's no better practice for all scenarios. Use either one depending on the purpose of your function:
You may pass the values of individual object properties if your function doesn't care about the object.
You should pass the object if your function is going to manipulate the object in some way, either by directly modifying its properties or by calling its methods.