Bug #73994 [Opn->Csd]: ReflectionFunction unpack
| From: | krakjoe@php.net | Date: | Thu, 26 Jan 2017 06:59:05 +0000 |
| Subject: | Bug #73994 [Opn->Csd]: ReflectionFunction unpack | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-206963@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=73994&edit=1
ID: 73994
Updated by: krakjoe@php.net
Reported by: jurigag at gmail dot com
Summary: ReflectionFunction unpack
-Status: Open
+Status: Closed
Type: Bug
Package: Reflection related
Operating System: Ubuntu 14.04
PHP Version: 7.1.1
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of krakjoe
Revision: http://git.php.net/?p=php-src.git;a=commit;h=76a7470160f977e486a1c9953012241abb5c1159
Log: Fixed bug #73994 incorrect arginfo for unpack
Previous Comments:
------------------------------------------------------------------------
[2017-01-25 18:07:59] danack@php.net
Probably the only thing that needs doing is replacing:
ZEND_BEGIN_ARG_INFO(arginfo_unpack, 0)
with
ZEND_BEGIN_ARG_INFO_EX(arginfo_unpack, 0, 0, 2)
------------------------------------------------------------------------
[2017-01-25 15:12:56] jurigag at gmail dot com
Description:
------------
In php 7.1.0 in changelog there is written that there were added additional parameter to unpack
function:
unpack() function accepts an additional optional argument $offset.
But in php 7.1.0 the number of parameters and required parameters is both 2. In php 7.1.1 both
returns 3
Test script:
---------------
$test = new ReflectionFunction("unpack");
echo $test->getNumberOfRequiredParameters();
echo $test->getNumberOfParameters();
Expected result:
----------------
For php 7.1.0:
2
3
For php 7.1.1:
2
3
Actual result:
--------------
For php 7.1.0:
2
2
For php 7.1.1:
3
3
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=73994&edit=1