php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #53327 Determine parameter names in ReflectionMethod::invokeArgs
Submitted: 2010-11-17 02:08 UTC Modified: 2010-11-18 12:03 UTC
From: contato at andersonfraga dot net Assigned:
Status: Not a bug Package: Reflection related
PHP Version: Irrelevant OS: Windows 7, Ubuntu 10.10, Gentoo
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: contato at andersonfraga dot net
New email:
PHP Version: OS:

 

 [2010-11-17 02:08 UTC] contato at andersonfraga dot net
Description:
------------
I would like to use the names of parameters to execute methods with specific arguments. But invokeArgs not correctly sends the names with those on the method.

I think this result is not correct. It should not obey the parameter names?

Test script:
---------------
http://pastebin.com/fuF4tWGq

Expected result:
----------------
arg1: orange
arg2: apple
arg3: 
--
and also report a warning because of missing arg3, i.e.

Actual result:
--------------
arg1: orange
arg2: apple
arg3: bad error

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-11-17 21:54 UTC] felipe@php.net
-Status: Open +Status: Bogus
 [2010-11-17 21:54 UTC] felipe@php.net
This is an expected behavior, there is no nothing special with argument names in Reflection.
 [2010-11-18 12:03 UTC] contato at andersonfraga dot net
I think this would be a nice feature...

Thank you Felipe.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 23:01:28 2024 UTC