Difference between hook_boot and hook_init Drupal


hook_boot hook_init
  • Even cached page executes this hook
  • Cached page doesn’t run this hook.
  • This hook is called before modules or most include files are loaded into memory.
  • When this hook is called, all modules are already loaded in memory.
  • It happens while Drupal is still in bootstrap mode.
  • It happens after bootstrap mode.
Advertisements

One thought on “Difference between hook_boot and hook_init Drupal

  1. Pingback: Acquia Certified Developer Exam: Review and Tips | Words and Work by Craig Vanderlinden

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s