php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #76084 Phar::isCompressed always returning False
Submitted: 2018-03-12 16:11 UTC Modified: 2018-03-12 16:24 UTC
From: bonnevillessei67 at hotmail dot com Assigned:
Status: Not a bug Package: PHAR related
PHP Version: Irrelevant OS: Windows 10
Private report: No CVE-ID: None
 [2018-03-12 16:11 UTC] 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)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-03-12 16:24 UTC] requinix@php.net
-Status: Open +Status: Not a bug -Package: Documentation problem +Package: PHAR related
 [2018-03-12 16:24 UTC] requinix@php.net
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.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Fri Sep 17 08:03:36 2021 UTC