Bug #78746 [Opn->Nab]: Inconsistent behavior of reset() on objects

From: Date: Thu, 24 Oct 2019 04:38:48 +0000
Subject: Bug #78746 [Opn->Nab]: Inconsistent behavior of reset() on objects
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-223448@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78746&edit=1 ID: 78746 Updated by: requinix@php.net Reported by: kolesnikov at farpost dot com -Summary: Inconsistent behavior of reset() +Summary: Inconsistent behavior of reset() on objects -Status: Open +Status: Not a bug Type: Bug Package: Arrays related Operating System: Linux PHP Version: 7.4.0RC4 Block user comment: N Private report: N New Comment: See bug #77864. Previous Comments: ------------------------------------------------------------------------ [2019-10-24 04:35:57] kolesnikov at farpost dot com Description: ------------ Function reset() returns false when using on Iterator or ArrayObject on PHP 7.4.0RC4, but returns value of first element of array on PHP 7.3.10 and below. Test script: --------------- <?php $iterator = new ArrayIterator([1, 2, 3]); var_dump(reset($iterator)); Expected result: ---------------- int(1) Actual result: -------------- bool(false) ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=78746&edit=1

« previous php.bugs (#223448) next »