|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #70960 ReflectionFunction for array_unique returns wrong number of parameters
Submitted: 2015-11-23 19:16 UTC Modified: -
From: ondrej at mirtes dot cz Assigned:
Status: Closed Package: Reflection related
PHP Version: Irrelevant OS: All
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
48 + 47 = ?
Subscribe to this entry?

 [2015-11-23 19:16 UTC] ondrej at mirtes dot cz
ReflectionFunction::getParameters() for built-in function array_unique returns one parameter, although in practice the function accepts two parameters (and documentation states the same).

Test script:

$ref = new ReflectionFunction('array_unique');
var_dump(count($ref->getParameters())); // outputs "1" in the PHP runtime

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-11-24 05:46 UTC]
Automatic comment on behalf of
Log: Fixed bug #70960 (ReflectionFunction for array_unique returns wrong number of parameters)
 [2015-11-24 05:46 UTC]
-Status: Open +Status: Closed
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun May 09 07:01:23 2021 UTC