Lines Matching refs:phar
2 Phar: test that creation of zip-based phar generates valid zip with all bells/whistles
4 phar
8 phar.readonly=0
12 $fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip.php';
13 $pname = 'phar://' . $fname;
14 $fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '.2.phar.zip.php';
15 $pname2 = 'phar://' . $fname2;
17 $phar = new Phar($fname);
19 $phar->setMetadata('hi there');
20 $phar['a'] = 'hi';
21 $phar['a']->setMetadata('a meta');
22 $phar['b'] = 'hi2';
23 $phar['b']->compress(Phar::GZ);
24 $phar['c'] = 'hi3';
25 $phar['c']->compress(Phar::BZ2);
26 $phar['b']->chmod(0444);
27 $phar->setStub("<?php ok __HALT_COMPILER();");
28 $phar->setAlias("hime");
29 unset($phar);
34 $phar = new Phar($fname2);
35 var_dump($phar['a']->getContent(), $phar['b']->getContent(), $phar['c']->getContent());
36 var_dump($phar['a']->isCompressed(), $phar['b']->isCompressed() == Phar::GZ, $phar['c']->isCompress…
38 var_dump($phar->getStub());
39 var_dump($phar->getAlias());
40 var_dump($phar->getMetadata());
41 var_dump($phar['a']->getMetadata());
45 @unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip.php');
46 unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.2.phar.zip.php');