A file is a file. The "extension" does not matter when reading it.
If you need a PHP script to be interpreted, you'll have to do this yourself (this does not work for anything but PHP scripts):
ob_start();
require "myscript.php";
$contents = ob_get_clean();
Then, $contents
can be added to the ZIP file.
This approach, however, is naive, since it relies on the required PHP script to execute cleanly and deliver all the required output to STDOUT. Which PHP scripts tend not to do.
Depending on your php.ini
(or other settings), warnings, errors or other things produced while executing the script that are not meant for public release will be included in your ZIP archive as well.