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");
11 phar.readonly=0
15 $fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip.php';
16 $pname = 'phar://' . $fname;
17 $fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar.zip.php';
18 $pname2 = 'phar://' . $fname2;
20 $phar = new Phar($fname);
22 $phar->setMetadata('hi there');
23 $phar['a'] = 'hi';
24 $phar['a']->setMetadata('a meta');
25 $phar['b'] = 'hi2';
26 $phar['b']->compress(Phar::GZ);
27 $phar['c'] = 'hi3';
28 $phar['c']->compress(Phar::BZ2);
29 $phar['b']->chmod(0444);
30 $phar->setStub("<?php ok __HALT_COMPILER();");
31 $phar->setAlias("hime");
32 unset($phar);
37 $phar = new Phar($fname2);
38 var_dump($phar['a']->getContent(), $phar['b']->getContent(), $phar['c']->getContent());
39 var_dump($phar['a']->isCompressed(), $phar['b']->isCompressed() == Phar::GZ, $phar['c']->isCompress…
41 var_dump($phar->getStub());
42 var_dump($phar->getAlias());
43 var_dump($phar->getMetadata());
44 var_dump($phar['a']->getMetadata());
48 <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip.php'); ?>
49 <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.zip.php'); ?>