How some hooks works, if doesn't return anything and doesn't have any references In Drupal API documentation is an example:

function hook_user_view($account, $view_mode, $langcode) {
  if (user_access('create blog content', $account)) {
    $account-&gt;content['summary']['blog'] =  array(
      '#type' =&gt; 'user_profile_item', 
      '#title' =&gt; t('Blog'), 
      '#markup' =&gt; l(t('View recent blog entries'), "blog/$account-&gt;uid", array('attributes' =&gt; array('title' =&gt; t("Read !username's latest blog entries.", array('!username' =&gt; format_username($account)))))), 
      '#attributes' =&gt; array('class' =&gt; array('blog')),
    );
  }
}


Noobie question is: how does it actually work? I mean, there is no reference being passed to the function, and it doesn't return anything. This is somewhat counter intuitive how function works. I guess $account data doesn't disappear with end of the function but how, if it's not a reference?
The $account variable is a PHP Object.

In PHP, Objects are (for the most part) passed by reference, so any changes you make to the variable passed in will be persisted to the object in memory. 

The only difference syntactically is that you don't need the ampersand before the variable name in the function signature - it's implied.