xref: /PHP-8.4/Zend/tests/oss_fuzz_58181.phpt (revision 5855bdcd)
1--TEST--
2oss-fuzz #58181: Fix unexpected reference returned from CallbackFilterIterator::accept()
3--FILE--
4<?php
5function test(array $data) {
6    $iterator = new ArrayIterator($data);
7    $iterator = new \CallbackFilterIterator($iterator, fn&() => true);
8    $iterator->rewind();
9}
10
11test(['a', 'b']);
12?>
13--EXPECTF--
14Notice: Only variable references should be returned by reference in %s on line %d
15