1--TEST--
2Phar: create a completely new phar
3--SKIPIF--
4<?php if (!extension_loaded("phar")) die("skip"); ?>
5<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
6--INI--
7phar.readonly=0
8phar.require_hash=1
9--FILE--
10<?php
11
12file_put_contents('phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php/a.php',
13	'brand new!');
14
15$phar = new Phar(dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php');
16
17var_dump($phar->getSignature());
18?>
19===DONE===
20--CLEAN--
21<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
22--EXPECTF--
23array(2) {
24  ["hash"]=>
25  string(40) "%s"
26  ["hash_type"]=>
27  string(5) "SHA-1"
28}
29===DONE===
30