|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78746 Inconsistent behavior of reset() on objects
Submitted: 2019-10-24 04:35 UTC Modified: 2019-10-24 04:38 UTC
From: kolesnikov at farpost dot com Assigned:
Status: Not a bug Package: Arrays related
PHP Version: 7.4.0RC4 OS: Linux
Private report: No CVE-ID: None
 [2019-10-24 04:35 UTC] kolesnikov at farpost dot com
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:

$iterator = new ArrayIterator([1, 2, 3]);


Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2019-10-24 04:38 UTC]
-Summary: Inconsistent behavior of reset() +Summary: Inconsistent behavior of reset() on objects -Status: Open +Status: Not a bug
 [2019-10-24 04:38 UTC]
See bug #77864.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Fri Jan 21 21:03:37 2022 UTC