Ejemplo n.º 1
0
<?php

$tarphar = new PharData(__DIR__ . '/bug69958.tar');
$phar = $tarphar->convertToData(Phar::TAR);
Ejemplo n.º 2
0
<?php

$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.zip';
$phar = new PharData($fname);
$phar['x'] = 'hi';
try {
    $phar->convertToData(Phar::ZIP, Phar::NONE, '.2.phar.zip');
} catch (BadMethodCallException $e) {
    echo $e->getMessage(), "\n";
}
?>
===DONE===
<?php 
unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.zip');