Drupal tip: Print out a list of modules implementing a hook

When building or debugging a module sometimes it's helpful to know which modules are implementing a particular hook. 

Drupal 7:

// The name of the hook.
$hook = 'node_access';

// Print out all modules implementing this hook.

Use dpr() if you have the Devel module enabled; otherwise use the PHP function print_r()

Example output:

    [0] => node
    [1] => features