2018-03-06 09:52:41 +00:00
|
|
|
# phar
|
|
|
|
|
|
|
|
> Create, update or extract PHP archives (PHAR).
|
2021-11-02 21:11:28 +00:00
|
|
|
> More information: <https://manned.org/phar>.
|
2018-03-06 09:52:41 +00:00
|
|
|
|
2024-01-31 03:55:19 +00:00
|
|
|
- Add one or more files or directories to a Phar file:
|
2018-03-06 09:52:41 +00:00
|
|
|
|
2024-01-31 03:55:19 +00:00
|
|
|
`phar add -f {{path/to/phar_file}} {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}`
|
2018-03-06 09:52:41 +00:00
|
|
|
|
|
|
|
- Display the contents of a Phar file:
|
|
|
|
|
|
|
|
`phar list -f {{path/to/phar_file}}`
|
|
|
|
|
|
|
|
- Delete the specified file or directory from a Phar file:
|
|
|
|
|
|
|
|
`phar delete -f {{path/to/phar_file}} -e {{file_or_directory}}`
|
|
|
|
|
|
|
|
- Compress or uncompress files and directories in a Phar file:
|
|
|
|
|
|
|
|
`phar compress -f {{path/to/phar_file}} -c {{algorithm}}`
|
|
|
|
|
|
|
|
- Get information about a Phar file:
|
|
|
|
|
|
|
|
`phar info -f {{path/to/phar_file}}`
|
|
|
|
|
|
|
|
- Sign a Phar file with a specific hash algorithm:
|
|
|
|
|
|
|
|
`phar sign -f {{path/to/phar_file}} -h {{algorithm}}`
|
|
|
|
|
|
|
|
- Sign a Phar file with an OpenSSL private key:
|
|
|
|
|
|
|
|
`phar sign -f {{path/to/phar_file}} -h openssl -y {{path/to/private_key}}`
|
2024-01-30 04:55:24 +00:00
|
|
|
|
|
|
|
- Display help and available hashing/compression algorithms:
|
|
|
|
|
|
|
|
`phar help`
|