storing wp_head in a variable?

This function doesn’t take any params, so there is no nice way of doing it.

But of course you can do this PHP way using output buffering 😉

ob_start();
wp_head();
$var = ob_get_clean();