In these examples, we're using hooks to modify the behavior of an API call and a custom function. The `add_filter` and `apply_filters` functions are part of a package library called WordPress, although custom implementations of hooks can be added to any PHP application or framework. Overall, PHP hooks are a powerful tool for customizing the behavior of existing codebases without having to rewrite them from scratch. By using hooks, you can avoid the risk of introducing bugs or breaking existing functionality, while still being able to add new features or change the way things work.