Lines Matching refs:phar
2 Phar: test that creation of tar-based phar generates valid tar with all bells/whistles
4 phar
6 phar.readonly=0
10 $fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.tar.php';
11 $pname = 'phar://' . $fname;
12 $fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '.2.phar.tar.php';
13 $pname2 = 'phar://' . $fname2;
15 $phar = new Phar($fname);
17 $phar->setMetadata('hi there');
18 $phar['a'] = 'hi';
19 $phar['a']->setMetadata('a meta');
20 $phar['b'] = 'hi2';
21 $phar['c'] = 'hi3';
22 $phar['b']->chmod(0444);
23 $phar->setStub("<?php ok __HALT_COMPILER();");
24 $phar->setAlias("hime");
25 unset($phar);
30 $phar = new Phar($fname2);
31 var_dump($phar['a']->getContent(), $phar['b']->getContent(), $phar['c']->getContent());
33 var_dump($phar->getStub());
34 var_dump($phar->getAlias());
35 var_dump($phar->getMetadata());
36 var_dump($phar['a']->getMetadata());
39 <?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.2.phar.tar.php'); ?>