Bug #66509 [Opn->Asn]: copy() arginfo has changed starting from 5.4

From: Date: Sat, 18 Jan 2014 02:44:47 +0000
Subject: Bug #66509 [Opn->Asn]: copy() arginfo has changed starting from 5.4
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-183879@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=66509&edit=1 ID: 66509 Updated by: willfitch@php.net Reported by: jpauli@php.net Summary: copy() arginfo has changed starting from 5.4 -Status: Open +Status: Assigned Type: Bug Package: Reflection related Operating System: * PHP Version: 5.4.24 -Assigned To: +Assigned To: willfitch Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2014-01-18 02:28:06] jpauli@php.net You can go for a patch. Please, merge it to 5.4/5.5/5.6 and master, and update NEWS accordingly (README.GIT-RULES details that) The patch is trivial though. Thx ------------------------------------------------------------------------ [2014-01-18 02:07:54] willfitch@php.net @jpauli are you submitting a patch? If not, I have some bandwidth. ------------------------------------------------------------------------ [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

« previous php.bugs (#183879) next »