In APIv2, it was common to follow the pattern of:

```php
$params = array(
  'foo' => $bar
);
$result = civicrm_api_whiz_bang($params);
```

Using an intermediate $params variable was necessary because the function expected arguments to be passed-by-reference, and it's still sometimes necessary if the arguments in $params are highly dynamic. But in terms of coding style, it's better to inline the array when possible (and you usually can with APIv3):

```php
$result = civicrm_api3('whiz', 'bang', array(
  'foo' => $bar
));
```

This is easier to read top-down, takes fewer lines of code, and is less prone to bugs when $params is declared multiple times.