In Drupal 7, there isn't a specific function provided by the core API to directly fetch all hook_menu() items from the database. However, you can achieve this by querying the menu_router table as demonstrated in the code snippet.
Source code viewer
// Get all menu items from the database. $query = db_select('menu_router', 'm'); $query->fields('m'); $result = $query->execute(); // Fetch menu items and add them to the array. foreach ($result as $item) { } dpm($items);Programming Language: PHP