All it does is save the output of the function to a file with the given name. The clever bit is that the output it sends to the browser is the content of the file; it doesn’t actually call the function until the end of the script execution and so doesn’t slow the output to the browser down.