|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74383 Wrong reflection on Phar::running
Submitted: 2017-04-06 11:38 UTC Modified: 2017-04-10 05:57 UTC
From: fabien dot villepinte at gmail dot com Assigned: krakjoe (profile)
Status: Closed Package: PHAR related
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2017-04-06 11:38 UTC] fabien dot villepinte at gmail dot com
The parameter of Phar::running is optional but it is described as required by reflection.

Test script:

$rc = new ReflectionClass(Phar::class);
$rm = $rc->getMethod("running");
echo $rm->getNumberOfParameters();
echo PHP_EOL;
echo $rm->getNumberOfRequiredParameters();
echo PHP_EOL;
echo (int) $rm->getParameters()[0]->isOptional();

Expected result:

Actual result:


Add a Patch

Pull Requests

Pull requests:

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-04-10 05:57 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: krakjoe
 [2017-04-10 05:57 UTC]
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at

 For Windows:
Thank you for the report, and for helping us make PHP better.

Not sure why this didn't close automatically.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Feb 28 07:01:28 2024 UTC