reset($arrayIterator) returns false
From manual page: https://php.net/function.reset
Not sure if it's a bug or not but I didn't find mention about it in the Changelog. So, I call reset() with ArrayIterator argument and get false
$arrayIterator = new \ArrayIterator(['a', 'b']);
echo reset($arrayIterator); // prints nothing because it returns false
I use PHP 7.4.27 I tested this piece of code in PHP Sandbox with 7.3.25 and 7.2.31 - both versions return 'a' value.
Anyway, I'll refactor my code to avoid reset() with ArrayIterator argument.
It is already stated for ArrayObject in the migration guide:
Probably makes sense to mention ArrayIterator here as well, and there should be respective changelog entries on the ArrayObject and ArrayIterator man pages.
This got clarified on the reset() page at one point, so closing. If someone considers this to still be an issue please open a new one.