To be clear, you’re wanting to use PHP to generate a cache.manifest, or can you create it manually? If creating it manually is ok for your case, that’s probably the way to go, but maybe I’m not understanding the use case.
There is no way to help you further if you don’t answer our questions about *why* you’re trying to use PHP for this task. If there is *no reason*, then my post above answers your question in its entirety. If there *is* a reason, you need to explain it.
So, **why**? What are you trying to accomplish by using PHP that you can’t do by simply writing the manifest in a text editor?
Of course, if your php file outputs html. In the even more simple case you can rename your index.html or whatever file you have that is making use of the app cache to index.php and it works the same. Because php is a server language and app cache has nothing to do with that.