|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-09-22 23:44 UTC] tony2001@php.net
-Type: Bug
+Type: Documentation Problem
[2010-09-22 23:44 UTC] tony2001@php.net
[2010-09-23 06:27 UTC] aharvey@php.net
-Status: Open
+Status: Assigned
-Package: Reflection related
+Package: PHAR related
-Assigned To:
+Assigned To: aharvey
[2010-09-23 06:39 UTC] aharvey@php.net
[2010-09-23 06:41 UTC] aharvey@php.net
[2010-09-23 06:52 UTC] aharvey@php.net
[2010-09-23 06:52 UTC] aharvey@php.net
-Status: Assigned
+Status: Closed
[2010-09-23 06:52 UTC] aharvey@php.net
[2010-09-23 17:37 UTC] aharvey@php.net
-Status: Closed
+Status: Assigned
-Type: Documentation Problem
+Type: Bug
[2010-09-23 17:37 UTC] aharvey@php.net
[2012-09-11 16:50 UTC] reeze@php.net
[2015-03-29 07:12 UTC] mike@php.net
[2015-03-30 02:23 UTC] reeze@php.net
[2017-10-24 07:18 UTC] kalle@php.net
-Status: Assigned
+Status: Open
-Assigned To: aharvey
+Assigned To:
[2018-08-05 01:49 UTC] carusogabriel@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: carusogabriel
[2018-08-05 01:49 UTC] carusogabriel@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 06:00:02 2025 UTC |
Description: ------------ I'm using PHP 5.3.3 and PHP trunk under FreeBSD 8.0 p4. I'm trying to retrieve arguments of phar::__construct() with ReflectionMethod::getArguments(). Phar::__construct() take only 3 arguments, but my script return 4 arguments, as if PharData::__construct() was used instead of Phar::__construct() by the reflection API. In fact, ext/phar_object.c contains the following comments : /* {{{ proto void Phar::__construct(string fname [, int flags [, string alias]]) * Construct a Phar archive object * {{{ proto void PharData::__construct(string fname [[, int flags [, string alias]], int file format = Phar::TAR]) * Construct a PharData archive object */ PHP_METHOD(Phar, __construct) { ... } Test script: --------------- <?php $method = new reflectionMethod('phar', '__construct'); foreach ($method->getParameters() as $parameter) { var_dump($parameter->getName()); var_dump($parameter->isOptional()); var_dump($parameter->isDefaultValueAvailable()); } ?> Expected result: ---------------- string(8) "filename" bool(false) bool(false) string(5) "flags" bool(true) bool(false) string(5) "alias" bool(true) bool(false) Actual result: -------------- string(8) "filename" bool(false) bool(false) string(5) "flags" bool(true) bool(false) string(5) "alias" bool(true) bool(false) string(10) "fileformat" bool(true) bool(false)