PHP code example of krzysztofzylka / phar

1. Go to this page and download the library: Download krzysztofzylka/phar library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

krzysztofzylka / phar example snippets


$phar = new \Krzysztofzylka\Phar\Phar('/path/to/file.tar.gz')
var_dump($phar->getContentList())

$phar = new \Krzysztofzylka\Phar\Phar('/path/to/file.tar.gz')
var_dump($phar->getFileContent('path/to/file/in/phar'))