Allow users to hook into the output of the PHP export

We often use ACF Lite on the production server for various reasons. The copy/ paste of PHP is working out ok, but placing a hook right before the echo would allow for automation of this.

I see my editor is a bit eager on whitespace or something, but what I did is collect all the output in one string, add an action (acf/export/php/after_export) and then echo the html.

This will allow people to catch the output, prefix it with <?php \n\n and store it in a file. Then only an upload/ git push remains to deploy.

What do you think of this working proof of concept? Tested it on my Mac in Chrome, so might have to do some more testing.