WordPress Pass Variable Into wp_footer, wp_head, & all Other Actions/ Hooks/Filters

Passing variables into WordPress hooks using an anonymous function I thought was impossible. I always worked around this and rewrote the logic. Today I found out anonymous functions support a use keyword, allowing passing:

So simple and easy. Shaves hours of troubleshooting.