php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #76432 Incorrect documentation of Phar constants
Submitted: 2018-06-08 22:35 UTC Modified: 2018-06-09 20:59 UTC
From: daniel dot jeffery at eigendev dot com Assigned: cmb (profile)
Status: Closed Package: PHAR related
PHP Version: 7.2.6 OS: Ubuntu
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: daniel dot jeffery at eigendev dot com
New email:
PHP Version: OS:

 

 [2018-06-08 22:35 UTC] daniel dot jeffery at eigendev dot com
Description:
------------
---
From manual page: http://www.php.net/phar.constants
---
There are three errors in the documentation of Phar class constants:

The constant "Phar::SAME" does not exist.
The value of constant "Phar::PHP" is 0, not 1
The value of constant "Phar::PHPS" is 1, not 2

Test script:
---------------
var_dump(Phar::PHP);
var_dump(Phar::PHPS);
var_dump(Phar::SAME);

Expected result:
----------------
int(1)
int(2)
int(0)

Actual result:
--------------
int(0)
int(1)

Fatal error: Uncaught Error: Undefined class constant 'SAME'

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-06-09 20:44 UTC] cmb@php.net
-Status: Open +Status: Verified -Assigned To: +Assigned To: cmb
 [2018-06-09 20:59 UTC] cmb@php.net
Automatic comment from SVN on behalf of cmb
Revision: http://svn.php.net/viewvc/?view=revision&revision=345111
Log: Fix #76432: Incorrect documentation of Phar constants
 [2018-06-09 20:59 UTC] cmb@php.net
-Status: Verified +Status: Closed
 [2018-06-09 20:59 UTC] cmb@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.
 [2020-02-07 06:05 UTC] phpdocbot@php.net
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=a00e5d589df3d7d0cb94c7afe46e2ae0f445c5f4
Log: Fix #76432: Incorrect documentation of Phar constants
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 17 11:01:34 2024 UTC