Bug #73994 [Com]: ReflectionFunction unpack
| From: | danack@php.net | Date: | Wed, 25 Jan 2017 18:08:00 +0000 |
| Subject: | Bug #73994 [Com]: ReflectionFunction unpack | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-206951@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
Comment by: danack@php.net
Reported by: jurigag at gmail dot com
Summary: ReflectionFunction unpack
Status: Open
Type: Bug
Package: Reflection related
Operating System: Ubuntu 14.04
PHP Version: 7.1.1
Block user comment: N
Private report: N
New Comment:
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)
Previous Comments:
------------------------------------------------------------------------
[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