Doc #78462 [Com]: Wrong return type for ArrayIterator::unserialize

From: Date: Tue, 27 Aug 2019 19:00:28 +0000
Subject: Doc #78462 [Com]: Wrong return type for ArrayIterator::unserialize
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-16912@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78462&edit=1 ID: 78462 Comment by: henry dot paradiz at gmail dot com Reported by: fabien dot villepinte at gmail dot com Summary: Wrong return type for ArrayIterator::unserialize Status: Open Type: Documentation Problem Package: SPL related PHP Version: Irrelevant Block user comment: N Private report: N New Comment: Me too! Please feel free to email me with the updates when they are released. I noticed this problem a few days ago, as well. henry.paradiz@gmail.com Previous Comments: ------------------------------------------------------------------------ [2019-08-27 11:37:21] fabien dot villepinte at gmail dot com Description: ------------ There is a mistake in the documentation of ArrayIterator::unserialize about the return type. It should be void instead of string. The 'Return Values' should also be updated accordingly. See: https://www.php.net/manual/en/arrayiterator.unserialize.php Test script: --------------- <?php $a = new ArrayIterator(); var_dump($a->unserialize( (new ArrayIterator([1, 2, 3]))->serialize() )); foreach ($a as $e) { var_dump($e); } Expected result: ---------------- NULL int(1) int(2) int(3) ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=78462&edit=1

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