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
 [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

Pull Requests

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: Thu Dec 12 21:01:28 2024 UTC