Doc #76084 [Opn->Nab]: Phar::isCompressed always returning False
Edit report at https://bugs.php.net/bug.php?id=76084&edit=1
ID: 76084
Updated by: requinix@php.net
Reported by: bonnevillessei67 at hotmail dot com
Summary: Phar::isCompressed always returning False
-Status: Open
+Status: Not a bug
Type: Documentation Problem
-Package: Documentation problem
+Package: PHAR related
Operating System: Windows 10
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Phar::compress() creates a new Phar.
Previous Comments:
------------------------------------------------------------------------
[2018-03-12 16:11:54] bonnevillessei67 at hotmail dot com
Description:
------------
Running:
Windows 10
WAMP 3.0.8
PHP 7.0.10
Apache 2.4.23
After compression of Phar file, method Phar::isCompressed() always returns FALSE.
Searched and scoured all previous bug reports. This is a new bug.
Test script:
---------------
$phar1 = new Phar('myphar.zip.phar');
var_dump($phar1->isCompressed());
$phar2 = new Phar('myuncompressed.tar.phar');
$phar2['x.txt']='my x';
var_dump($phar2->isCompressed());
$phar2->compress(Phar::GZ);
var_dump($phar2->isCompressed() == Phar::GZ);
Expected result:
----------------
bool(false)
bool(false)
bool(true)
Actual result:
--------------
bool(false)
bool(false)
bool(false)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=76084&edit=1
Thread (2 messages)