php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #68340 [feature req:php-cli] zipped module like .pyz in python , .jar in java
Submitted: 2014-11-04 02:26 UTC Modified: 2014-11-04 02:32 UTC
From: zaxebo1 at gmail dot com Assigned:
Status: Not a bug Package: CGI/CLI related
PHP Version: Irrelevant OS: irrelevant ;ubuntu 14.04
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: zaxebo1 at gmail dot com
New email:
PHP Version: OS:

 

 [2014-11-04 02:26 UTC] zaxebo1 at gmail dot com
Description:
------------
In python, if i have multiple program files: "a1.py, a2.py, __main__.py,  dir1/b1.py, dir1/b2.py" and then i zip it as myprogram1.pyz
then i can run it as "python myprogram.pyz" (__main__.py inside the zip file will be executed first). It is easy to distribute a single file myprogram1.pyz 

see: http://blogs.gnome.org/jamesh/2012/05/21/python-zip-files/
===
in java also we can bundle all the .class files into a single .jar file and run it
 java -jar myprogram1.jar
========
Now, i request you to kind provide a feature in php-cli that if i have lots of files like: a1.php , a2.php, __main__.php dir1/a4.php  etc. (say, which uses PHP-GTK for a Desktop application). Then i should be able to bundle them as zip file, say myprog1.zip or myprog1.pz (pz =php's zipped executable archive).
And then i can distribute this "single file" and execute it as:

   php myprog1.pz

This will execute the __main__.php file among all the other .php files, inside this .zip archive myprog1.pz .


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-11-04 02:32 UTC] requinix@php.net
-Status: Open +Status: Not a bug
 [2014-11-04 02:32 UTC] requinix@php.net
We have those already: PHAR files.
http://php.net/manual/en/intro.phar.php

Here's a couple links that look decent to get you started:
http://www.sitepoint.com/packaging-your-apps-with-phar/
http://www.ibm.com/developerworks/library/os-php-5.3new4/
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 09:01:29 2024 UTC