php.net |  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ondrej at mirtes dot cz
New email:
PHP Version: OS:

 

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

https://3v4l.org/Tj5cj

Test script:
---------------
<?php

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

Expected result:
----------------
int(2)

Actual result:
--------------
int(1)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-11-24 05:46 UTC] laruence@php.net
Automatic comment on behalf of laruence@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=e6b46dc2ff80e78a537155b6d5a556426c90fb59
Log: Fixed bug #70960 (ReflectionFunction for array_unique returns wrong number of parameters)
 [2015-11-24 05:46 UTC] laruence@php.net
-Status: Open +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 12:01:29 2024 UTC