Wordpress - add_action(), add_filter() before or after function

It is easier to read: When is what called? If you are debugging a hook you can immediately see if you have to read the function or not: If it is not your hook, you can skip the code.

In my themes and plugins I combine all registrations for actions, filters and shortcodes at the top and I add the hook to the PHPDoc block:

add_action( 'wp_head',  'foo' );
add_action( 'shutdown', 'bar' );

/**
 * Foo you!
 *
 * @wp-hook wp_head
 * @return  void
 */
function foo()
{
    print '<!-- foo -->';
}

There is no real difference actually, I for example prefer to follow first scenario, because it's neater to place calls in one place, and define functions below that. PHP parses the whole document prior to running anything, and if functions are properly defined, everything will work normally, no advantage in either scenario.

I believe the right saying here is: Whatever floats your boat :)