Bug #70960 [Opn->Csd]: ReflectionFunction for array_unique returns wrong number of parameters

From: Date: Tue, 24 Nov 2015 05:46:15 +0000
Subject: Bug #70960 [Opn->Csd]: ReflectionFunction for array_unique returns wrong number of parameters
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-197392@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70960&edit=1

 ID:                 70960
 Updated by:         laruence@php.net
 Reported by:        ondrej at mirtes dot cz
 Summary:            ReflectionFunction for array_unique returns wrong
                     number of parameters
-Status:             Open
+Status:             Closed
 Type:               Bug
 Package:            Reflection related
 Operating System:   All
 PHP Version:        Irrelevant
 Block user comment: N
 Private report:     N

 New Comment:

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)


Previous Comments:
------------------------------------------------------------------------
[2015-11-23 19:16:41] 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)


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=70960&edit=1


Thread (2 messages)

« previous php.bugs (#197392) next »