I would like to create a zip file in memory using a ZipArchive (or a native PHP class) and read the content of the file back to the client. Is this possible? If so, how?>
Try ZipStream (link to GitHub repo, also supports install via Composer).
From original author's website (now dead):
ZipStream is a library for dynamically streaming dynamic zip files from PHP without writing to the disk at all on the server.