Bug #66509 [Com]: copy() arginfo has changed starting from 5.4
Edit report at https://bugs.php.net/bug.php?id=66509&edit=1
ID: 66509
Comment by: willfitch@php.net
Reported by: jpauli@php.net
Summary: copy() arginfo has changed starting from 5.4
Status: Open
Type: Bug
Package: Reflection related
Operating System: *
PHP Version: 5.4.24
Block user comment: N
Private report: N
New Comment:
@jpauli are you submitting a patch? If not, I have some bandwidth.
Previous Comments:
------------------------------------------------------------------------
[2014-01-17 17:21:36] jpauli@php.net
Description:
------------
php53 --rf copy
Function [ <internal:standard> function copy ] {
- Parameters [3] {
Parameter #0 [ <required> $source_file ]
Parameter #1 [ <required> $destination_file ]
Parameter #2 [ <optionnal> $context ]
}
}
php54 --rf copy
Function [ <internal:standard> function copy ] {
- Parameters [3] {
Parameter #0 [ <required> $source_file ]
Parameter #1 [ <required> $destination_file ]
Parameter #2 [ <required> $context ]
}
}
Starting from 5.4, copy() arginfo decl has been changed from ZEND_BEGIN _ARG_INFO_EX to ZEND_BEGIN
_ARG_INFO , making all parameters required for Reflection. $context is though optionnal
Test script:
---------------
$r = new \ReflectionFunction('copy');
foreach($r->getParameters() as $p) {
var_dump($p->isOptional());
}
Expected result:
----------------
bool(false)
bool(false)
bool(true)
Actual result:
--------------
bool(false)
bool(false)
bool(false)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=66509&edit=1
Thread (6 messages)