Lines Matching refs:phar
4 <?php if (!extension_loaded("phar")) die("skip"); ?>
7 phar.require_hash=0
8 phar.readonly=0
12 $fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar';
13 $fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '2.phar';
15 $phar = new Phar($fname);
16 $phar['a.txt'] = 'some text';
17 $phar->setMetadata('hi');
18 $phar->stopBuffering();
19 var_dump($phar->isFileFormat(Phar::TAR));
20 var_dump(strlen($phar->getStub()));
21 var_dump($phar->getMetadata());
23 $phar = $phar->convertToExecutable(Phar::TAR);
24 var_dump($phar->isFileFormat(Phar::TAR));
25 var_dump($phar->getStub());
26 var_dump($phar->getMetadata());
28 $phar['a'] = 'hi there';
30 $phar = $phar->convertToExecutable(Phar::PHAR, Phar::GZ);
31 var_dump($phar->isFileFormat(Phar::PHAR));
32 var_dump($phar->isCompressed());
33 var_dump(strlen($phar->getStub()));
34 var_dump($phar->getMetadata());
38 $phar = new Phar($fname2);
39 var_dump($phar->isFileFormat(Phar::PHAR));
40 var_dump($phar->isCompressed() == Phar::GZ);
41 var_dump(strlen($phar->getStub()));
42 var_dump($phar->getMetadata());
48 unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.gz');
49 unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '2.phar');
50 unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar');
51 unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar');
52 unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar.gz');
60 string(60) "<?php // tar-based phar archive stub file