$iterator = new ArrayIterator([1, 2]);
array_walk($iterator, function($item) {echo $item . PHP_EOL;});
This piece of php code outputs the items (1 and 2) in php 7.3 but it outputs nothing in php 7.4. Can anyone explain what changed in php 7.4 that resulted in this change ? I cannot find anything related to that in the changelogs.
Just in case someone needs to work around this, you can convert iterator to array.
https://3v4l.org/Xq9Dc