SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG
DONATE


YUM REPOSITORY

 
 

MAN page from Fedora 25 php-cli-7.0.19~RC1-2.fc25.remi.i686.rpm

PHAR

Section: User Commands (1)
Updated: 2016
Index 

NAME

phar, phar.phar - PHAR (PHP archive) command line tool 

SYNOPSIS

phar<command> [options] ...

 

DESCRIPTION

The PHAR file format provides a way to put entire PHP applications into a singlefile called a "phar" (PHP Archive) for easy distribution and installation.With the phar command you can create, update or extract PHP archives.Commands: add compress delete extract help help-list info list meta-delmeta-get meta-set pack sign stub-get stub-set tree version

 

add command

Add entries to a PHAR package.Required arguments:
-f fileSpecifies the phar file to work on.
...Any number of input files and directories. If -i is inuse then ONLY files and matching the given regularexpression are being packed. If -x is given then filesmatching that regular expression are NOT being packed.Optional arguments:
-a aliasProvide an alias name for the phar file.
-c algoCompression algorithm (see COMPRESSION)
-i regexSpecifies a regular expression for input files.
-l levelNumber of preceding subdirectories to strip from file entries
-x regexRegular expression for input files to exclude.

 

compress command

Compress or uncompress all files or a selected entry.Required arguments:
-c algoCompression algorithm (see COMPRESSION)
-f fileSpecifies the phar file to work on.Optional arguments:
-e entryName of entry to work on (must include PHAR internaldirectory name if any).

 

delete command

Delete entry from a PHAR archiveRequired arguments:
-e entryName of entry to work on (must include PHAR internaldirectory name if any).
-f fileSpecifies the phar file to work on.

 

extract command

Extract a PHAR package to a directory.Required arguments:
-f fileSpecifies the phar file to work on.Optional arguments:
-i regexSpecifies a regular expression for input files.
-x regexRegular expression for input files to exclude.
...Directory to extract to (defaults to '.').

 

help command

This help or help for a selected command.Optional arguments:
...Optional command to retrieve help for.

 

help-list command

Lists available commands.

 

info command

Get information about a PHAR package.By using -k it is possible to return a single value.Required arguments:
-f fileSpecifies the phar file to work on.Optional arguments:
-k indexSubscription index to work on.

 

list command

List contents of a PHAR archive.Required arguments:
-f fileSpecifies the phar file to work on.Optional arguments:
-i regexSpecifies a regular expression for input files.
-x regexRegular expression for input files to exclude.

 

meta-del command

Delete meta information of a PHAR entry or a PHAR package.If -k is given then the metadata is expected to be an array and thegiven index is being deleted.If something was deleted the return value is 0 otherwise it is 1.Required arguments:
-f fileSpecifies the phar file to work on.Optional arguments:
-e entryName of entry to work on (must include PHAR internaldirectory name if any).
-k indexSubscription index to work on.

 

meta-get command

Get meta information of a PHAR entry or a PHAR package in serialized from. Ifno output file is specified for meta data then stdout is being used.You can also specify a particular index using -k. In that case themetadata is expected to be an array and the value of the given indexis returned using echo rather than using serialize. If that index doesnot exist or no meta data is present then the return value is 1.Required arguments:
-f fileSpecifies the phar file to work on.Optional arguments:
-e entryName of entry to work on (must include PHAR internaldirectory name if any).
-k indexSubscription index to work on.

 

meta-set command

Set meta data of a PHAR entry or a PHAR package using serialized input. If noinput file is specified for meta data then stdin is being used. You canalso specify a particular index using -k. In that case the metadata isexpected to be an array and the value of the given index is being set.If the metadata is not present or empty a new array will be created.If the metadata is present and a flat value then the return value is1. Also using -k the input is been taken directly rather then beingserialized.Required arguments:
-f fileSpecifies the phar file to work on.
-m metaMeta data to store with entry (serialized php data).Optional arguments:
-e entryName of entry to work on (must include PHAR internaldirectory name if any).
-k indexSubscription index to work on.

 

pack command

Pack files into a PHAR archive.When using -s <stub>, then the stub file is being excluded from thelist of input files/dirs.To create an archive that contains PEAR classPHP_Archive then point -p argument to PHP/Archive.php.Required arguments:
-f fileSpecifies the phar file to work on.
...Any number of input files and directories. If -i is inuse then ONLY files and matching the given regularexpression are being packed. If -x is given then filesmatching that regular expression are NOT being packed.Optional arguments:
-a aliasProvide an alias name for the phar file.
-b bangHash-bang line to start the archive (e.g. #!/usr/bin/php).The hash mark itself '#!' and the newline character are optional.
-c algoCompression algorithm (see COMPRESSION)
-h hashSelects the hash algorithm (see HASH)
-i regexSpecifies a regular expression for input files.
-l levelNumber of preceding subdirectories to strip from file entries
-p loaderLocation of PHP_Archive class file (pear list-filesPHP_Archive).You can use '0' or '1' to locate itautomatically using the mentioned pear command. Whenusing '0' the command does not error out when the classfile cannot be located. This switch also adds some codearound the stub so that class PHP_Archive getsregistered as phar:// stream wrapper if necessary. Andfinally this switch will add the file phar.inc fromthis package and load it to ensure class Phar ispresent.
-s stubSelect the stub file.
-x regexRegular expression for input files to exclude.
-y keyPrivate key for OpenSSL signing.

 

sign command

Set signature hash algorithm.Required arguments:
-f fileSpecifies the phar file to work on.
-h hashSelects the hash algorithm (see HASH)Optional arguments:
-y keyPrivate key for OpenSSL signing.

 

stub-get command

Get the stub of a PHAR file. If no output file is specified as stub then stdoutis being used.Required arguments:
-f fileSpecifies the phar file to work on.Optional arguments:
-s stubSelect the stub file.

 

stub-set command

Set the stub of a PHAR file. If no input file is specified as stub then stdinis being used.Required arguments:
-f fileSpecifies the phar file to work on.Optional arguments:
-b bangHash-bang line to start the archive (e.g. #!/usr/bin/php).The hash mark itself '#!' and the newline character are optional.
-p loaderLocation of PHP_Archive class file (pear list-filesPHP_Archive).You can use '0' or '1' to locate itautomatically using the mentioned pear command. Whenusing '0' the command does not error out when the classfile cannot be located. This switch also adds some codearound the stub so that class PHP_Archive getsregistered as phar:// stream wrapper if necessary. Andfinally this switch will add the file phar.inc fromthis package and load it to ensure class Phar ispresent.
-s stubSelect the stub file.

 

tree command

Get a directory tree for a PHAR archive.Required arguments:
-f fileSpecifies the phar file to work on.Optional arguments:
-i regexSpecifies a regular expression for input files.
-x regexRegular expression for input files to exclude.

 

version command

Get information about the PHAR environment and the tool version.

 

COMPRESSION

Algorithms:
0No compression
noneNo compression
autoAutomatically select compression algorithm
gzGZip compression
gzipGZip compression
bz2BZip2 compression
bzip2BZip2 compression

 

HASH

Algorithms:
md5MD5
sha1SHA1
sha256SHA256
sha512SHA512
opensslOpenSSL

 

SEE ALSO

For a more or less complete description of PHAR look here:http://php.net/phar 

BUGS

You can view the list of known bugs or report any new bug youfound at:http://bugs.php.net 

AUTHORS

The PHP Group: Thies C. Arntzen, Stig Bakken, Andi Gutmans, Rasmus Lerdorf, Sam Ruby, Sascha Schumann, Zeev Suraski, Jim Winstead, Andrei Zmievski.Work for the PHP archive was done by Gregory Beaver, Marcus Boerger.A List of active developers can be found here:http://www.php.net/credits.phpAnd last but not least PHP was developed with the help of a huge amount of contributors all around the world. 

VERSION INFORMATION

This manpage describes phar, version 7.0.19RC1. 

COPYRIGHT

Copyright © 1997-2016 The PHP Group

This source file is subject to version 3.01 of the PHP license,that is bundled with this package in the file LICENSE, and isavailable through the world-wide-web at the following url:http://www.php.net/license/3_01.txtIf you did not receive a copy of the PHP license and are unable toobtain it through the world-wide-web, please send a note tolicenseAATTphp.netso we can mail you a copy immediately.


 

Index

NAME
SYNOPSIS
DESCRIPTION
add command
compress command
delete command
extract command
help command
help-list command
info command
list command
meta-del command
meta-get command
meta-set command
pack command
sign command
stub-get command
stub-set command
tree command
version command
COMPRESSION
HASH
SEE ALSO
BUGS
AUTHORS
VERSION INFORMATION
COPYRIGHT

This document was created byman2html,using the manual pages.