Doc #71412 [Opn->Csd]: Wrong parameters for ArrayIterator::__construct

From: Date: Sun, 02 Jul 2017 14:44:16 +0000
Subject: Doc #71412 [Opn->Csd]: Wrong parameters for ArrayIterator::__construct
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-14812@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=71412&edit=1 ID: 71412 Updated by: pollita@php.net Reported by: arjen at parse dot nl Summary: Wrong parameters for ArrayIterator::__construct -Status: Open +Status: Closed Type: Documentation Problem Package: SPL related Operating System: Linux PHP Version: 7.0.2 -Assigned To: +Assigned To: pollita Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2017-07-02 14:44:06] pollita@php.net Closed by https://github.com/php/php-src/commit/96fe07e0062393d04188aa79f66979fc6bd4fee8 ------------------------------------------------------------------------ [2016-01-19 10:00:57] arjen at parse dot nl Description: ------------ https://3v4l.org/SlLdF#v702 http://php.net/manual/en/arrayiterator.construct.php mentions two parameters: array and flags. In 7.0.1 it has only array, since 7.0.2 it has array, ar_flags and iterator_class. Behaviour changed by https://bugs.php.net/bug.php?id=71077 For ArrayObject is also reports ar_flags instead of flags. Test script: --------------- <?php $rm = new ReflectionMethod('ArrayIterator', '__construct'); var_dump($rm->getParameters()); Expected result: ---------------- array(1) { [0]=> object(ReflectionParameter)#2 (1) { ["name"]=> string(5) "array" } } or array(3) { [0]=> object(ReflectionParameter)#2 (1) { ["name"]=> string(5) "array" } [1]=> object(ReflectionParameter)#3 (1) { ["name"]=> string(8) "flags" } } Actual result: -------------- array(3) { [0]=> object(ReflectionParameter)#2 (1) { ["name"]=> string(5) "array" } [1]=> object(ReflectionParameter)#3 (1) { ["name"]=> string(8) "ar_flags" } [2]=> object(ReflectionParameter)#4 (1) { ["name"]=> string(14) "iterator_class" } } ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=71412&edit=1

« previous php.doc.bugs (#14812) next »