Lines Matching refs:phar
2 Phar: test that creation of zip-based phar generates valid zip with all bells/whistles
5 if (!extension_loaded("phar")) die("skip");
12 phar.readonly=0
16 $fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip.php';
17 $pname = 'phar://' . $fname;
18 $fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar.zip.php';
19 $pname2 = 'phar://' . $fname2;
21 $phar = new Phar($fname);
23 $phar->setMetadata('hi there');
24 $phar['a'] = 'hi';
25 $phar['a']->setMetadata('a meta');
26 $phar['b'] = 'hi2';
27 $phar['b']->compress(Phar::GZ);
28 $phar['c'] = 'hi3';
29 $phar['c']->compress(Phar::BZ2);
30 $phar['b']->chmod(0444);
31 $phar->setStub("<?php ok __HALT_COMPILER();");
32 $phar->setAlias("hime");
33 unset($phar);
38 $phar = new Phar($fname2);
39 var_dump($phar['a']->getContent(), $phar['b']->getContent(), $phar['c']->getContent());
40 var_dump($phar['a']->isCompressed(), $phar['b']->isCompressed() == Phar::GZ, $phar['c']->isCompress…
42 var_dump($phar->getStub());
43 var_dump($phar->getAlias());
44 var_dump($phar->getMetadata());
45 var_dump($phar['a']->getMetadata());
49 <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip.php'); ?>
50 <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.zip.php'); ?>