php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #45394 phar::running options reversed
Submitted: 2008-06-30 18:10 UTC Modified: 2008-08-22 04:28 UTC
From: sixd@php.net Assigned: cellog (profile)
Status: Closed Package: Documentation problem
PHP Version: 5.2CVS-2008-06-30 (CVS) OS: Linux
Private report: No CVE-ID: None
 [2008-06-30 18:10 UTC] sixd@php.net
Description:
------------
The http://www.php.net/manual/en/phar.running.php examples and description of the method argument say "TRUE by default. If TRUE, the full path on disk to the phar archive is returned. If FALSE, a full phar URL is returned.".  

This is incorrect


Reproduce code:
---------------
<?php

echo "In index.php\n";

$a = Phar::running(); // $a is "/path/to/my.phar"
echo "phar file: $a\n";
$b = Phar::running(false); // $b is "phar:///path/to/my.phar"
echo "phar URL: $b\n";

?>


Expected result:
----------------
In index.php
phar file: /home/cjones/public_html/phr1.phar
phar URL: phar:///home/cjones/public_html/phr1.phar

Actual result:
--------------
In index.php
phar file: phar:///home/cjones/public_html/phr1.phar
phar URL: /home/cjones/public_html/phr1.phar

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-07-23 20:36 UTC] sfox@php.net
Thanks!

I'll be going through the docs with a fine-toothed comb once we hit the feature freeze for PHP 5.3. Will close this when the description is reversed :)

- Steph
 [2008-08-22 04:28 UTC] cellog@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.

got bored and fixed it
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 06 19:01:36 2025 UTC