Proposal for "PHP_Archive"

» Metadata » Status
  • Category: PHP
  • Proposer: Davey Shafik 
  • License: Apache License
» Description


PHP_Archive provides similar functionality to Javas .jar files.

PHP_Archive is a specially formatted *valid* TAR file.

Inclusion of files is done by using require_once 'phar://file.php'; instead of just require_once 'file.php';

What PHP_Archive Does Do

  • PHP_Archive allows you to distribute a single file with your entire application in it.
  • PHP_Archive doesn't have lengthy unpacking times
  • PHP_Archive's are valid TAR archives
  • PHP_Archive's are valid PHP scripts (assuming the packed code is valid
  • PHP_Archive's can be created with the *nix 'tar' command, just include a special file, and use [code]phar_default.php[/code] as the start file for your application.
  • PHP_Archive works on PHP 4.3.0+ and PHP 5
  • PHP_Archive_Creator also allows you specify a different file than phar_default.php as the file to run.
  • PHP_Archive_Creator will have the ability to compress files

What PHP_Archive Does NOT Do

  • PHP_Archive does not protect your script, all files are stored in plain-text inside a valid TAR file. Anybody can unpack them.

Added November 29th 2004

PHP_Archive 0.4.0 now includes a fully working PHP_Archive_Creator class, it does not yet allow adding complete directories - easy to implement just haven't gotten to it yet :)

PHP_Archive still does not implement compression, for some reason it just won't work. Trying to fix!

Fully documented (in the tar.gz) and has an example of PHP_Archive_Creator usage

You can download the new tarball here
gamma goblin store

» Dependencies » Links
  • Archive_Tar 1.2
  • PHP 4.3.0
» Timeline » Changelog
  • First Draft: 2004-06-13
  • Proposal: 2004-06-14
  • Call for Votes: 2004-12-06
  • Davey Shafik
    [2004-06-14 19:01 UTC]

    Proposal no longer states that it will not compress files. Also now says about being able to specify the default file.

  • Davey Shafik
    [2004-11-30 03:47 UTC]

    Added notes on progress, including addition of PHP_Archive_Creator and a new 0.4.0 tarball.

  • Thies C. Arntzen
    [2023-10-12 14:09 UTC]

  • Thies C. Arntzen
    [2023-10-12 14:10 UTC]