} catch (Exception $e) {
echo $e->getMessage() . "\n";
}
-
+try {
+$phar->addFile(dirname(__FILE__) . '/does/not/exist');
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
?>
===DONE===
--CLEAN--
hi
Entry phar://%saddfuncs.phar.php/a does not exist and cannot be created: phar error: invalid path "phar://%saddfuncs.phar.php/a" contains double slash
Entry a does not exist and cannot be created: phar error: file "a" in phar "%saddfuncs.phar.php" cannot be opened for writing, readable file pointers are open
+phar error: unable to open file "%s/does/not/exist" to add to phar archive
===DONE===
\ No newline at end of file
$phar = new Phar($fname);
var_dump($phar->getMetadata());
$phar->setMetadata(array('my' => 'friend'));
+$phar->setMetadata(array('my' => 'friend'));
var_dump($phar->getMetadata());
$phar['a']->setMetadata(42);
$phar['b']->setMetadata(NULL);